Trouble with .ASE and transparencies


(Oj) #1

I’ve got a model of a tree to be used, but am having trouble getting the tree texture to use the shader that has been written for it, rather than the .tga file without any transparency.

The way I have this setup right now is:

Tree is using material: “models/mapobjects/w1txt/tree1” , where tree1 is the .tga texture with alpha channel.

Then, I’ve written a shader which is “/scripts/tree1.shader”. The code is as following…

models\mapobjects\w1txt ree1
{
cull none
nopicmip
{
map models\mapobjects\w1txt ree1.tga
blendfunc blend
depthWrite
rgbGen vertex
}
}

How should this shaderfile be named/placed in order to have the tree use this shader, rather than the default non-transparent shader? I’ve tried changing the material name to point to the shaderfile, but had no luck.

Thanks in advance for help.

-Oj


(ydnar) #2

Always use / slashes in shaders. There are no exceptions.

Change ALL of the \ slashes in your shader to / and everything will be kosher.

Remember:

models/mapobjects/w1txt/tree1

is NOT the same as:

models\mapobjects\w1txt ree1

y