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

Unified handling of core shader generation defines #7298

Merged
merged 4 commits into from
Jan 20, 2025

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jan 20, 2025

In a move towards define driven uber-shaders:

  • all core shader generation defines are handled in a unified way, mostly outside of the generators themselves, and are supplied as options. (GAMMA, TONEMAP, FOG, RENDERPASS, ..)
  • removed gamma1_0 and gamma 2_2 chunks, and created a single gamma chunk driven by a define
  • removed fogExp, forExp2, forLinear, fogNone chunks and create a single fog chunk driven by a define

Added a Test/Global Shader Properties example:

  • hidden from published example, only for local testing (and so it's not very pretty)
  • renders instances of all shaders generators (sky, gsplat, lit-shader, standard-material, particles, shader-material)
  • enables tonemapping, fog and gamma to be changed to validate its functionality
  • currently gsplat does not support fog, all else works

Screenshot 2025-01-20 at 12 52 31

@mvaligursky mvaligursky merged commit 61ce060 into main Jan 20, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-shadergen-defines branch January 20, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants