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

SSR: add the useFresnel property to generate more physically accurate results #13917

Merged
merged 4 commits into from
May 30, 2023

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented May 29, 2023

Extract from the useFresnel property doc:

Gets or sets a boolean indicating whether the blending between the current color pixel and the reflection color should be done with a Fresnel coefficient (default: false).
It is more physically accurate to use the Fresnel coefficient (otherwise it uses the reflectivity of the material for blending), but it is also more expensive when you use blur (when blurDispersionStrength > 0).

I also disable the reflectivity test when the threshold is 0, to save some branching in the shader code.

I'll update the documentation once the PR has been merged.

@Popov72 Popov72 changed the title SSR: add the useFresnel property to obtain more physically accurate results SSR: add the useFresnel property to generate more physically accurate results May 29, 2023
@bjsplat
Copy link
Collaborator

bjsplat commented May 29, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented May 29, 2023

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny NEAT and good to go

@sebavan sebavan enabled auto-merge May 29, 2023 21:22
@sebavan sebavan merged commit 1956b1b into BabylonJS:master May 30, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants