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

OutputPass: shader does not compile if renderer.toneMapping is set #26346

Closed
WestLangley opened this issue Jun 28, 2023 · 3 comments · Fixed by #26371
Closed

OutputPass: shader does not compile if renderer.toneMapping is set #26346

WestLangley opened this issue Jun 28, 2023 · 3 comments · Fixed by #26371

Comments

@WestLangley
Copy link
Collaborator

Description

Setting, for example,

renderer.toneMapping = THREE.ACESFilmicToneMapping;

will cause OutputPass shader to fail to compile.

Reproduction steps

  1. Add renderer.toneMapping = THREE.ACESFilmicToneMapping to an example using OutputPass.

Code

renderer.toneMapping = THREE.ACESFilmicToneMapping

Live example

Screenshots

No response

Version

r154dev

Device

No response

Browser

No response

OS

No response

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 28, 2023

This happens because of GLSL redefinitions.

What is your use case for using OutputPass with inline tone mapping? I assumed this is no valid use case so I did not add support for this.

@WestLangley
Copy link
Collaborator Author

Yes, only NoToneMapping is correct when using RenderPass. I'm thinking it would be best for render pass to know that...

Also, I find it confusing that it is required to set tone mapping and exposure in two places: (1) for the renderer, and (2) for OutputPass.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 28, 2023

Indeed, it was mentioned in #26102 (comment) that OutputPass ideally extracts the settings from the renderer.

I did not implement this yet because of the mentioned GLSL redefinitions in context ShaderMaterial. There is no runtime error with RawShaderMaterial however we can't include shader chunks with this material type. Not sure how to solve this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants