Game Development Community

Shader Question

by Louis Deane · in Torque 3D Beginner · 10/19/2009 (10:17 am) · 0 replies

Hey, i was messing around with T3D at college. i was wandering how you import a custom texture into a sampler in a shader?

singleton PostEffect( VISRPostEffect )
{
renderTime = "PFXAfterDiffuse";
//renderBin = "ObjTranslucentBin";
renderPriority = 9998;
requirements = "PrePassDepth";

shader = PFX_VISRShader;
stateBlock = PFX_DefaultVISRStateBlock;
texture[0] = "#VISRedge";
texture[1] = "$backBuffer";
texture[2] = "./noise1.png";
target = "$backBuffer";
};

This was the code i had, note the noise1.png loaded into the texture[2] slot. i realize i have probably done something wrong XD plx help