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

WebGLRenderer: Move transmission properties to Material struct #24435

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Aug 2, 2022

Related issue: #24385

Description

I could just put some more *Factor variables but I think this implementation is more organized, it follows similarly to the implementation of sheen and clearcoat.

This contribution is funded by Google via Igalia

@gkjohnson
Copy link
Collaborator

Just a small word of caution here - on some Android Adreno devices floats in structs are limited to 16 bits of precision instead of 32 while non struct uniforms are afforded 32 bits of precision... which is a massive pain. It might not be a huge issue for values that are kept between [ -1.0, 1.0 ], but it's something to keep in mind as you go.

I ran into this when doing some path tracing work. Here's some context:

@Mugen87 Mugen87 added this to the r144 milestone Aug 3, 2022
@mrdoob mrdoob merged commit f0a9e0c into mrdoob:dev Aug 3, 2022
@mrdoob
Copy link
Owner

mrdoob commented Aug 3, 2022

Thanks!

@sunag sunag deleted the dev-transmission-mtl-struct branch August 3, 2022 15:30
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
…b#24435)

* Move transmission properties to Material struct

* cleanup
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
…b#24435)

* Move transmission properties to Material struct

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

Successfully merging this pull request may close these issues.

4 participants