Skip to content
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

Add a uint version of u_ColorModulate #1476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Dec 26, 2024

Picked from #1473.

Requires #1475 because I don't want to bother with merge conflicts.

Add u_ColorModulateColorGen for use with shaders other than cameraEffects, since the latter can get an arbitrary vec4 for it. All other shaders only use 12 distinct states of u_ColorModulateColorGen, encoded as 5 bits. Also adds u_ColorModulateLightFactor as a global uniform, to be able to put the genericMaterial shader struct into 8 bytes.

Fixes an issue with material shader post-processing that was removing global uniforms that had similar names to a non-global one.

Add `u_ColorModulateColorGen` for use with shaders other than `cameraEffects`, since the latter can get an arbitrary vec4 for it. All other shaders only use 12 distinct states of `u_ColorModulateColorGen`, encoded as 5 bits. Also adds `u_ColorModulateLightFactor` as a global uniform, to be able to put the `genericMaterial` shader struct into 8 bytes.

Fixes an issue with material shader post-processing that was removing global uniforms that had similar names to a non-global one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Renderer T-Improvement Improvement for an existing feature T-Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant