Not logged inOpenClonk Forum
Up Topic Colored lights

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to PeterW
Interestingly enough, the existing gamma implementation seems to be mostly linear. Something like this:

vec3 gamma[3];

slice(finish+2) {
  bvec3 ishigh = greaterThan(color.rgb, vec3(0.5,0.5,0.5));
  vec3 weight = 2.0 * abs(color.rgb - vec3(0.5,0.5,0.5));
  color.rgb = (vec3(1.0,1.0,1.0) - weight) * gamma[1] +
              weight * mix(gamma[0], gamma[2], ishigh);
}


Not sure whether this is directly better or worse than anything. From what I've read on the internet, using "pow" is considered the "standard" solution.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill