PDA

View Full Version : The math for topdown texture addition in materials?



musilowski
12-12-2009, 09:02 AM
I'm trying to figure out how to add a node system in the material editor to add a texture sample only on surfaces facing upwards (with fade and so on) in the world.

I figured that a vector (0,0,-1) and an inverted fresnel and textures combined with a LERP would do it, but alas it didn't.

Any pointers on achieving this material setup? This should be procedural so the world position or rotation would not affect the material, making bonky results.