Parallax issue
by Paul Ash · in Torque Game Engine Advanced · 09/08/2007 (9:25 pm) · 6 replies
For some reason im unable to get the parallax shader on the TDN working. i added the shaders to the /shader folder, added the entry to the shaders.cs then updated my materials to include the shader=parallax; and pixversion = 2.0; im at a loss on what to do it being such a simple process to add it there are only really only 3 steps and its not working.. any input would be most helpful!
About the author
#2
{
baseTex[0] = "MetalPlane";
bumpTex[0] = "MetalPlane_n";
shader = Parallax;
pixversion = 2.0;
pixelSpecular[0] = true;
specular[0] = "0.1 0.1 0.1 0.1";
specularPower[0] = 5.0;
};
Its just not working, i see the normal map like you normally see it effected by light, but its def not parallax'ed
looks exactly the same without the shader = parallax added
09/08/2007 (9:55 pm)
New Material(MetalPlane){
baseTex[0] = "MetalPlane";
bumpTex[0] = "MetalPlane_n";
shader = Parallax;
pixversion = 2.0;
pixelSpecular[0] = true;
specular[0] = "0.1 0.1 0.1 0.1";
specularPower[0] = 5.0;
};
Its just not working, i see the normal map like you normally see it effected by light, but its def not parallax'ed
looks exactly the same without the shader = parallax added
#3
09/08/2007 (9:57 pm)
I made the bump map for it really bumped out for testing reasons as well, just to make that clear
#4
09/08/2007 (10:35 pm)
That tdn article was written a while ago. Your material.cs file should look like this:New CustomMaterial(MetalPlane)
{
texture[0] = "MetalPlane";
texture[1] = "MetalPlane_n";
shader = Parallax;
pixversion = 2.0;
specular = "0.1 0.1 0.1 0.1";
specularPower = 5.0;
};
#5
09/08/2007 (10:36 pm)
I tried that as well, made the texture just be a flat texture with no bump map. i wish i knew hlsl shaders(only know openGL) then id make a test one that just makes the texture turn red or something and see if its even applying at all.
#6
new CustomMaterial(MetalPlane)
{
texture[0] = "~/data/interiors/MetalPlane";
texture[1] = "~/data/interiors/MetalPlane_n";
texture[2] = "$lightmap";
shader = Parallax;
mapTo = "MetalPlane";
pixversion = 2.0;
specular = "0.75 0.75 0.75 0.75";
specularPower = 5.0;
};
09/09/2007 (8:16 am)
Got itnew CustomMaterial(MetalPlane)
{
texture[0] = "~/data/interiors/MetalPlane";
texture[1] = "~/data/interiors/MetalPlane_n";
texture[2] = "$lightmap";
shader = Parallax;
mapTo = "MetalPlane";
pixversion = 2.0;
specular = "0.75 0.75 0.75 0.75";
specularPower = 5.0;
};
Torque Owner Matt Vitelli