-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] - Allow prepass in webgl #7537
Conversation
2482062
to
f7e86a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea generally. Mostly just nits.
f737833
to
41466f5
Compare
I don't know what's going on, but this just stopped working. It worked perfectly fine when I created the PR, but it seems like I squashed a change I shouldn't have and now it stopped working. I still think we should bind the prepass textures even for webgl, but I can't get the example to work in webgl anymore. |
@superdump For the sake of merging this in time. I removed the changes in the example to make it work in webgl. So now all this does is some minor refactors and bind the textures in webgl when msaa is disabled. This way, we can figure out how to correctly sample the depth at a later time, but the textures will still be available for anyone to figure it out instead of being blocked by the engine. |
Please update. |
5a6643e
to
7ce8000
Compare
@superdump updated |
572e0ed
to
0033fe3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and my tests appear to get as far as everyone else (Internal error in FRAGMENT shader: WGSL textureLoad
from depth textures is not supported in GLSL)
bors r+ |
# Objective - Use the prepass textures in webgl ## Solution - Bind the prepass textures even when using webgl, but only if msaa is disabled - Also did some refactors to centralize how textures are bound, similar to the EnvironmentMapLight PR - ~~Also did some refactors of the example to make it work in webgl~~ - ~~To make the example work in webgl, I needed to use a sampler for the depth texture, the resulting code looks a bit weird, but it's simple enough and I think it's worth it to show how it works when using webgl~~
# Objective - Use the prepass textures in webgl ## Solution - Bind the prepass textures even when using webgl, but only if msaa is disabled - Also did some refactors to centralize how textures are bound, similar to the EnvironmentMapLight PR - ~~Also did some refactors of the example to make it work in webgl~~ - ~~To make the example work in webgl, I needed to use a sampler for the depth texture, the resulting code looks a bit weird, but it's simple enough and I think it's worth it to show how it works when using webgl~~
Objective
Solution
Also did some refactors of the example to make it work in webglTo make the example work in webgl, I needed to use a sampler for the depth texture, the resulting code looks a bit weird, but it's simple enough and I think it's worth it to show how it works when using webgl