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

Fog + Tonemapping #7181

Open
willeastcott opened this issue Dec 7, 2024 · 1 comment
Open

Fog + Tonemapping #7181

willeastcott opened this issue Dec 7, 2024 · 1 comment
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@willeastcott
Copy link
Contributor

Often, you want to fade your scene via a fog color so that it matches the clear color of the camera.

This works fine if you have tonemapping disabled. But let's say you enable linear tonemapping and have 0.1, 0.1, 0.1 clear color set, you need to set the fog color to roughly 0.21, 0.21, 0.21 for the scene to match up with the camera's clear color.

Is this because we need to be applying fog after the tonemap? Or should we be tonemapping the fog color?

@mvaligursky
Copy link
Contributor

I think the problem is that the clear color is not tonemapped. A workaround here would be to render an inverted sphere with a color as this color would be tonemapped. Not surer convenient though.
This should not be an issue if post-effects / CameraFrame rendering is used, as the clear color is used to clear the color and the tone mapping is applied over it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

No branches or pull requests

3 participants