How to assign the texture of mirrortexture to shader ?

line 33 & line 101

You can set customRenderTargets:

scene.customRenderTargets = [mirror]

Here is the edited playground:

What I also found:

  1. your ground is created without scene
  2. add to your ShaderMaterial-parameterOptions: samplers: ["map"]
  3. you might want to rename map to reflectionSampler
1 Like

Thanks for your correction.

when camera moving , It seems that this texture and ground will be a little misaligned,
Is it because the size of the two can’t be the same?
I modified the size of both, but it doesn’t solve the problem

Maybe CustomMaterial is a good solution for it .

1 Like