Is it possible to use a movie texture as a normal map, or as a mask to hide a texture in a shader?

I’m a moderately experienced Unity dev, but I’m only barely starting to get my feet wet in shaders. I have a project coming up that would benefit from animated normal maps and animated texture masking - does anybody have any idea if this is possible in Unity, and could I get some clues on how to achieve this? Even the right search terms would go a long way…!

Many thanks in advance…!

Movie textures have been deprecated for a while now, I believe the new solution is the video player:

It is possible to do what you require, but it’s also pretty convoluted. You would need to render the video to a RenderTexture, then send that to the material. From there, you would need to manually manipulate the data to be usable as a normal map (because Unity’s default functions rely on some texture import settings which wouldn’t be applicable as it isn’t a texture).

To convert it to a useable normal map you would need to reconstruct a vector from it - depending on how you store the data, that could be very easy, i.e.;

//In a surface shader
o.Normal = tex2D (_VideoNormalMap, i.uv).xyz * 2.0 - 1.0;

As for texture masking, that would be done as normal.