depth is always zero from three 134->135 #341
-
I'm currently in the process of migrating to 133 to 136 in three. From 134->135 my custom effect no longer functions because the depth value coming from main differs void mainImage(const in vec4 inputColor, const in vec2 uv, const in float depth, out vec4 outputColor) { I'm wondering if anyone knows what changed in three from this version. I've poked around and see a lot of changes in renderer nothing I really understand, and their migration guides don't mention anything in particular. My implementation: https://github.com/imbateam-gg/titan-reactor/tree/dev/packages/titan-reactor/src/renderer/fogofwar I noticed in 6.23.4 that there is a comment: My fog texture happens to be |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I haven't investigated this yet, but depth texture support might be broken when multisample anti-aliasing is enabled (via
You can use |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response. |
Beta Was this translation helpful? Give feedback.
-
The latest version |
Beta Was this translation helpful? Give feedback.
-
just wanted to showcase some of what I'm doing with postprocessing, using depth of field and scanline 👍 |
Beta Was this translation helpful? Give feedback.
I haven't investigated this yet, but depth texture support might be broken when multisample anti-aliasing is enabled (via
multisampling
). The reason for this could be that texture management was changed to usegl.texStorage2D()
inthree
r135 due to issues withSRGB8_ALPHA8
.You can use
RedFormat
if you're using WebGL 2. Otherwise, just stick toRGBAFormat
becausethree
recently removed support forRGBFormat
.