- Home /
Light based texture change on material
Just wondering before I try going into shaders more as I am not too great with them: Would it be possible via shader to have two Textures, a Default one but then another one that is layered on top that only shows when there is light shining on it.
Basically in another way, A material for Earth that has a night texture and day texture, Where the day texture only displays were the sun light is on the material.
Or is there an easier method to create this effect without using shaders.
Comment
Yes, this is what shaders are for. If I'm remembering my trig correctly, you'd grab the dot product of the normal and the light direction then, depending on the sign of the result you'd use one of two textures for that pixel.