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

createDerivedShader: inject fragmentColorTransform before postprocessing chunks #20

Closed
lojjic opened this issue Nov 13, 2019 · 0 comments

Comments

@lojjic
Copy link
Collaborator

lojjic commented Nov 13, 2019

The builtin ThreeJS shaders have a set of fragment shader chunks that perform what could be considered post-processing tasks such as tone mapping, encoding, dithering, etc. Currently the fragmentColorTransform is injected after these chunks, but it would be more appropriate to inject it before those chunks, but after any other gl_FragColor manipulation.

I took an initial swing at it here: 85c71d6 and it works ok in nominal cases but fails when double-deriving due to #include expansion.

lojjic added a commit that referenced this issue Apr 16, 2020
… to postprocessing chunks

Derived materials used to inject fragmentColorTransform after any of the
builtin postprocessing shader chunks like tonemapping/fog/etc. This
fixes that so the user's color transform is still subject to those final
bits of processing. Closes issue #20.
@lojjic lojjic closed this as completed Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant