Open Makio64 opened 10 months ago
not sure what the issue is
try referring to this sandbox https://codesandbox.io/s/mesh-transmission-demo-wfvh4m?file=/src/index.js
not sure what the issue is
try referring to this sandbox https://codesandbox.io/s/mesh-transmission-demo-wfvh4m?file=/src/index.js
Thanks for the link, it helps !
It appears when I start with backside:false in the mtmParams, the anisotropicBlur and other option didnt work. I think its a bug? And probably the similar issue with what I have, I'm gonna test this asap.
See if you can replicate the issue in the sandbox, then we'll try to replicate in r3f +fix it there (then bring that fix here 🤩)
I replicate the issue on this fork : https://codesandbox.io/s/mesh-transmission-demo-forked-m9rhgg
if backside is false at start then the effect didnt behave as expected, for example the anisotropicBlur will have no effect at all
https://codesandbox.io/s/mesh-transmission-backside-off-at-start-bug-wfvh4m?file=/src/index.js
on line 197 there was a missing parent.material = meshTransmissionMaterial
, adding that seems to make it work correctly when backside is off from start
does this fix your usecase/bugged state ?
@vis-prime Thanks,
I found the main reason of the bug in my scene :
Now the scale have another problem, the geometry have to be small to correctly works, but the object scale can be bigger.. :
// this works
let mesh = new Mesh(new PlaneGeometry(1, 1, 32, 32), this.glassMaterial)
mesh.scale.setScalar(500)
//this didnt works
let mesh = new Mesh(new PlaneGeometry(500, 500, 32, 32), this.glassMaterial)
yeah that is true , will try enquire about it with the effect's authors
temp/unreliable fix could be if to divide the values by 500 before applying...
The MeshTransmissionMaterial works exactly like the PhysicalMeshMaterial and all special feature didnt work i try in both threejs
v150
&v158
, result is the same as you can see on these screenshot :with no displacement, work as the PhysicalMeshMaterial and special feature didnt work![image](https://github.com/pmndrs/drei-vanilla/assets/213351/31670b90-2a21-4211-b6f0-2f8bfdfac427)
the displacement create this noise and is correctly animated on time.![image](https://github.com/pmndrs/drei-vanilla/assets/213351/59c26a88-5181-4d99-b2ca-a20329e62d9d)
my code for creating the glassMaterial
three
version:v150
&158
@pmndrs/vanilla
version: latest^1.13.3
node
version:v20.5.0
npm
(oryarn
) version: pnpm8.8.0
Problem description:
It seems some part of the shader with the special stuffs are not working
the FBO is correctly working as we can see the pixelisation due to the low resolution
I double check the uniforms seems to be correctly set on the Material
the defines looks also fine
{PHYSICAL: "", STANDARD: "",USE_TRANSMISSION:""}
And I also check the final fragment shader but I coudn't find an error here