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

[BREAKING] ShaderMaterial no longer auto includes gamma, tonemapping and fog code #7331

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Feb 5, 2025

ShaderMaterial used to automatically include the mentioned chunks, equivalent to:

            #include "gammaPS"
            #include "tonemappingPS"
            #include "fogPS"

Now that ShaderMaterial has grown into a more general system that initially intended, this has been removed.

If the user uses relevant code functions:

      vec3 fogged = addFog(colorLinear);
      vec3 toneMapped = toneMap(fogged);
      gl_FragColor.rgb = gammaCorrectOutput(toneMapped);

they need to include the relevant functionality into their shader

@mvaligursky mvaligursky merged commit 5f84d9c into main Feb 5, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-shadermaterial-no-includes branch February 5, 2025 12:00
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