PDA

View Full Version : shader help


patchx
06-22-2002, 07:09 AM
can anyone tell me how to make a new shader come up in game?

i made an edited version of the slime shader that isnt translucent and got it to show up in GTK but it doesnt show up in game all i did was added a new entry to the imperial.shader file the same as the slime one and deleted the translucent bit

-patch

alienprotein
06-22-2002, 07:28 AM
You will need to add it to your pk3 file.

patchx
06-22-2002, 07:30 AM
the actuall texture?

its already there its the slime one i just wanna alter its translucency

-patch

Xcom
06-22-2002, 10:16 AM
Do they have different reference names or your copied the names also?

Suppose you have:

textures/imperial/slime1
{
code
code
}

then you should copy it and then change the name, ie:

textures/imperial/slime1_custom
{
different code
different code
}

ps:

I suggest you make different shader file for it otherwise you'll need to distribute whole imperial.shader when your map is ready.

patchx
06-22-2002, 10:21 AM
yup i called it slime2
but the rest is the same everything except the "surfparm translucent" line which i deleted from the altered one

does the jk2 game use the imperial.shader file or is that just for GTKRadiant?

and if it doesnt is there a different shader control file thing that i have to alter for the game?

-patch

Xcom
06-22-2002, 10:38 AM
jk2 game definetely uses imperial.shader. I am sure of it. :D
Actually, it uses all shader files stored in your base/shaders.
I dunno why it's not working. :/

What exactly do you see in the game? Anyway, as I said, it's better to make new file.

patchx
06-22-2002, 10:50 AM
thanks x-com

i made a new shader file called tavion.shader but how do i get GTK to give me the option of using it?

-patch

Xcom
06-22-2002, 11:09 AM
1. Make an empty tavion directory under base/textures.

2. Add "tavion" to shaderlist.txt in base/shaders

3. Make a file tavion.shader in base/shaders (you did that already)

4. Now paste the slime code (with whatever modification you want, only leave the first line intact) in it.


textures/tavion/slime2
{
qer_editorimage textures/imp_mine/slime
surfaceparm water
surfaceparm fog
surfaceparm trans
sort seeThrough
fogparms ( 0.32549 0.635294 0.0156863 ) 256.0
deformvertexes wave 100 sin 1 2 0 0.25
{
map textures/imp_mine/slime
blendFunc GL_ONE GL_ONE
rgbGen wave noise 0.5 0.1 0 25
tcMod turb 1 0.05 -1 0.05
tcMod scroll 0.01 -0.025
tcMod stretch noise 1 0.01 0 0.05
}
{
map textures/imp_mine/slime
blendFunc GL_ONE GL_ONE
rgbGen wave sin 0.25 0.1 0.5 1
tcMod scroll 0.05 0.05
tcMod turb 1 0.1 1 0.005
tcMod stretch noise 1 0.01 0 0.05
tcMod scale 0.5 0.5
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_SRC_COLOR
}
}


Now in radiant, you should see tavion texture set in the menu. ;)

patchx
06-22-2002, 11:37 AM
thanks dood

lol
i dont think ive ever seen you not know the answer to something
a virtual font of knowledge

-patch