move UVs of a texture

Click image for larger version

Name:	customUV.jpg
Views:	1
Size:	49.3 KB
ID:	1079911

Go to the material options on the left, and use a Custom UV. Create a vector parameter, use it to scale and offset your texture coordinate, and feed it back into the custom UV slot for that texture coordinate.

You could also do this right before sampling your texture in the main body of your material, but that will add an extra instruction in your base pass shader (for every pixel) compared to using a Custom UV. Using a Custom UV can also let the GPU pre-fetch the texture data since it knows at the vertex exactly which texture samples you are going to need later in the shader--probably more important for mobile devices than modern PC GPUs these days.

If you want to do fancier distortion effects (i.e. heat waves, water ripples, etc.) above and beyond a constant scale/offset, there is no way around doing it per-pixel before you sample it in the base pass.

猜你喜欢

转载自www.cnblogs.com/vfxJerry/p/9253343.html