1
votes

How can i move normal map without moving the camera and without moving light source in Three.js?

i have a plane that is perpendicular to the vector of the camera view. This plane is always in the center of the view. When I move the camera, and the plane moves with the camera and light source moves too.

Light source located behind the camera and directed onto the plane. This source of lighting as well as the plane moves synchronously with the camera.

To observe the changes on the map of the plane, I can either move the camera or move the light source. In my situation they move simultaneously and are not displaced relative to each other.

I need something like another virtual camera movement which would produce changes in the normal map on plane.

Thank you for your attention.

1

1 Answers

0
votes

the most efficient way to do this is by creating a new shader. a less efficient method would be using a canvas as a texture. by moving the image on the canvas, you move the texture on the plane.

im currently working on a project which requires a HUD, i'm using similar methods. when i get to it i'll post a fiddle.