I wanted to check if it’s possible to display any video as a reflection texture for the mesh material.
Something like this, but I want the mesh to have its own material—just with a video reflection instead of an environment reflection. Maybe even a video environment.
Yes, that’s how this coordinate mode works. You can try to provide your own reflection matrix by overriding the Texture.getReflectionTextureMatrix method:
How would it be possible to rotate video texture with TEXTURE_FIXED_EQUIRECTANGULAR_MODE
I tried different option, but got no result.
The second option I wanted to try is to rotate TEXTURE_SPHERICAL_MODE
Even though that code works, but it appears that it actually rotates the sphere instead of charging the texture position, I just want to rotate the video by 30-180 degrees so that right corner of the video is in the center of the sphere
You can try to update our projection shader code to take into account some offsets.
Here’s one way to do it for the fixed equirectangular case:
The projection code is in the reflectionFunction.fx file, so I simply copy/pasted this code in the PG and added a opOffsets uniform to the computeFixedEquirectangularCoords function, which is added to the longitude/latitude calculated lines 135/136. A material plugin is used to set values to this uniform.