Refraction,Planar Reflection, how to?
by Rastislav Lechner · in Torque Game Engine Advanced · 09/15/2008 (11:09 pm) · 1 replies
Does someone have a exsample for me ? please.
i can not find any exsample code/material config for Refraction and Planar Reflection.
i can not find any exsample code/material config for Refraction and Planar Reflection.
Torque Owner Teromous
new CustomMaterial( ReflectBumpMat ) { texture[1] = "$backbuff"; texture[0] = "~/data/interiors/planar_d"; texture[2] = "~/data/interiors/planar_n"; shader = ReflectBump; version = 2.0; mapTo = "PLANAR"; planarReflection = true; specular[0] = "1 1 1 1"; specularPower[0] = 64.0; };mapTo is the name of the texture that you're attaching the material to, so just change that to the name of the texture that occupies the face you want to be reflective. Both planar_d and planar_n can be found in the downloadable demo.