Closed
Description
I'm trying to apply useFluid
and useBlending
FX to a custom <MeshReflectorMaterial/>
from drei
, to create a reflective water with ripple as you move the mouse along the surface, and I encounter some issues with it:
- The mouse positions are set to viewport by default, while I want to map it to the plane UV coordinates. Is this possible?
- In
<MeshReflectorMaterial/>
fragment shader, it output color asvec4 diffuseColor
, so I can not "morph" the UV using the usual ways "texture2D(diffuseColor, uv)". I wonder if it is possible to morph the UV ofdiffuseColor
in this case? - Render the whole scene into
createPortal
to use it as texture of full-screen FX plane will disable the mouse movement of scene, leads to any prior mouse event in the scene will stop working.
I wonder if everything mention above is possible with this package? I have ported and created CustomMeshReflectorMaterial
, linked it with useFluid and useBlending to apply the FX to the material in this codesandbox!
Metadata
Metadata
Assignees
Labels
No labels