renderer: implement mapOverBrightBits in GLSL#1035
Conversation
slipher
left a comment
There was a problem hiding this comment.
Can you say which changes to the GLSL correspond to lightmaps, light grids, and vertex lighting?
|
I think I will postpone that work for after 0.55 is released, with other things like sRGB. Such work may uncover some bugs or require more redesign in other place and may be the entrance of a rabbit hole 😄️. |
I may have to re-introduce All the code in GLSL in this branch is about both lightmap and gridlight. PR #1032 made possible to write a single |
|
This implementation has no future. The design of the optimal code for us is deeply tied to our linear/sRGB implementation, so it will be part of #1034: |
| maxComponent = max(maxComponent, color.g); | ||
| maxComponent = max(maxComponent, color.b); | ||
| maxComponent = 1.0 / maxComponent; | ||
| color *= maxComponent; |
There was a problem hiding this comment.
This was actually repoducing a bug (light being clamped and then wrong)…
Implement mapOverBrightBits in GLSL.
This is required for deluxe mapping since we need to do the computation on lights without blended attenuation.
This will also be required when using lightmaps in non-linear colorspace as the computation would have to be done on lights after they are linearized.