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

Fix transmission by setting the correct value for transmissive_lighting_input.F_ab #13379

Merged
merged 1 commit into from
May 16, 2024

Conversation

geckoxx
Copy link
Contributor

@geckoxx geckoxx commented May 15, 2024

Objective

Solution

  • Set transmissive_lighting_input.F_ab to the correct value

transmission_fix

@alice-i-cecile alice-i-cecile added this to the 0.14 milestone May 15, 2024
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen labels May 15, 2024
Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

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

Approved, but I'm not sure where 0.1 came from for F_ab. @pcwalton probably knows, it would be nice to document it.

Copy link
Member

@mockersf mockersf left a comment

Choose a reason for hiding this comment

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

works for me!
F_ab is also mentioned in several other place as having a 0.1 value for transmitted light contribution

// NOTE: We use the diffuse transmissive color, the second Lambertian lobe's calculated
// world position, inverted normal and view vectors, and the following simplified
// values for a fully diffuse transmitted light contribution approximation:
//
// roughness = 1.0;
// NdotV = 1.0;
// R = vec3<f32>(0.0) // doesn't really matter
// F_ab = vec2<f32>(0.1)
// F0 = vec3<f32>(0.0)

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 16, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 16, 2024
Merged via the queue into bevyengine:main with commit 1efa578 May 16, 2024
32 checks passed
@geckoxx geckoxx deleted the fix_transmission branch May 16, 2024 15:06
@pcwalton
Copy link
Contributor

Aha, sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transmission renders black on some GPU
5 participants