-
Notifications
You must be signed in to change notification settings - Fork 61
renderer: implement mapOverBrightBits in GLSL #1035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.