Any way to do calculations based on UVs in Shader Mixer?
agent unawares
Posts: 3,513
I'm not even sure that's a decent title.
I'm trying to get a shader to alter based on the UV map - say be dark on the upper right hand corner and light on the lower right hand corner, or be able to have higher displacement on specific areas of the UV...something like that. I can't just do it with texture mapping, I need something adjustable. Even some way to map out the UV coordinates by color would be helpful - I could use that to drive other changes but I can't figure out how to do anything based on UVs at all other than map a texture.
[I'm probably being a dunce - feel free to tell me as long as you point out how. :lol: ]
...Also, is there a way to adjust gamma?
Comments
I have no idea about the gamma... but everything on the UVS can be mapped and most if not all parameters can be weakened based on a Grayscale UVMap. I say weakened because the strength you set is the upper limit.
The Tiler brick will give u and v values for the point being looked at, if you set the repeats to 1 and the offsets to 0, or the Variable bricks will give the raw u and v values (the fixed variable brick always, the plain variable brick only when it's connected to a suitable root brick through some number of other bricks)
Thanks, guys. I tricked the particular effect I wanted out of it using texture mapping and mix nodes, but this will still come in handy. I didn't even think to check the tiler brick for something like that.