-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - gltf-loader: disable backface culling if material is double-sided #4270
[Merged by Bors] - gltf-loader: disable backface culling if material is double-sided #4270
Conversation
Can you please make and link and issue for this? |
Actually it looks like we do this already, so no need to do anything: https://github.com/bevyengine/bevy/blob/main/crates/bevy_pbr/src/render/pbr.wgsl#L505 |
bors r+ |
) # Objective The [glTF spec](https://github.com/KhronosGroup/glTF/blob/8e798b02d254cea97659a333cfcb20875b62bdd4/specification/2.0/Specification.adoc#395-double-sided) the `doubleSided` has the following to say about the `doubleSided` boolean: > When this value is false, back-face culling is enabled, i.e., only front-facing triangles are rendered. > When this value is true, back-face culling is disabled and double sided lighting is enabled. The back-face MUST have its normals reversed before the lighting equation is evaluated. ## Solution Disable backface culling when `doubleSided: true`.
…vyengine#4270) # Objective The [glTF spec](https://github.com/KhronosGroup/glTF/blob/8e798b02d254cea97659a333cfcb20875b62bdd4/specification/2.0/Specification.adoc#395-double-sided) the `doubleSided` has the following to say about the `doubleSided` boolean: > When this value is false, back-face culling is enabled, i.e., only front-facing triangles are rendered. > When this value is true, back-face culling is disabled and double sided lighting is enabled. The back-face MUST have its normals reversed before the lighting equation is evaluated. ## Solution Disable backface culling when `doubleSided: true`.
…vyengine#4270) # Objective The [glTF spec](https://github.com/KhronosGroup/glTF/blob/8e798b02d254cea97659a333cfcb20875b62bdd4/specification/2.0/Specification.adoc#395-double-sided) the `doubleSided` has the following to say about the `doubleSided` boolean: > When this value is false, back-face culling is enabled, i.e., only front-facing triangles are rendered. > When this value is true, back-face culling is disabled and double sided lighting is enabled. The back-face MUST have its normals reversed before the lighting equation is evaluated. ## Solution Disable backface culling when `doubleSided: true`.
Objective
The glTF spec the
doubleSided
has the following to say about thedoubleSided
boolean:Solution
Disable backface culling when
doubleSided: true
.