PDA

View Full Version : Custom Shader


Mr. Chopper
09-02-2003, 10:06 PM
I'm having a heck of a time getting my custom shader to work. I was looking for a lava shader that would simulate water and stuff, and I Couldn't find one, so I decided to make my own. I just copied the water2 shader from bespin.shader, and changed it to point to the lava texture from imp_mine. When I Test the game, it shows up as those lovely gridlines we've all come to know and love. :( Oh yeah, and that's AFTER setting sv_pure to 0. Anybody have any suggestions?

Lil Killa
09-03-2003, 02:04 AM
make sure your folder and file names are correct.

Eldritch
09-03-2003, 03:50 AM
Originally posted by Mr. Chopper
Oh yeah, and that's AFTER setting sv_pure to 0. Anybody have any suggestions?
If you're using textures that are included with the game, you shouldn't have to.

What does your shader code look like?

Mr. Chopper
09-03-2003, 04:15 AM
textures/bespin/lavapool
{
qer_editorimage textures/llj/lava2
surfaceparm metalsteps
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm water
surfaceparm fog
surfaceparm trans
q3map_material Water
q3map_nolightmap
q3map_onlyvertexlighting
fogparms ( 1 0.3373 0.0314 ) 1024.0
{
map textures/llj/lava2
blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
rgbGen exactVertex
alphaGen const 0.2
tcMod scroll 0.005 0.01
tcMod turb 1 0.03 0 0.3
}
{
map textures/llj/lava2
blendFunc GL_ONE GL_SRC_ALPHA
rgbGen exactVertex
alphaGen const 0.2
tcMod scroll -0.005 -0.01
tcMod turb 0 -0.03 0.5 -0.3
}
}

Note that lava2 is a texture that is already in imp_mine. I simply made a copy elsewhere to reference. This is esentially the water2 shader code from bespin.shader, changed around to (hopefully) depict lava instead of water.

Eldritch
09-03-2003, 02:33 PM
Originally posted by Mr. Chopper
Note that lava2 is a texture that is already in imp_mine. I simply made a copy elsewhere to reference. This is esentially the water2 shader code from bespin.shader, changed around to (hopefully) depict lava instead of water.
Why would you create a copy? You can reference the image of lava with a shader and it won't affect the regular lava. All you'd be doing by making a copy of something people already have is increasing the file size. Pointless.

Try referencing it with the original location (imp_mine/lava2 I think) and see what happens.

Mr. Chopper
09-03-2003, 04:13 PM
I did that originally, and then I couldn't find the imp_mine/lava2 texture in radiant, so I thought if I had referenced it directly, I couldn't use it again for anything else, I duno. That's why I made the copy. It was doing the exact same thing when I was referencing the original, too.

wedge2211
09-04-2003, 02:19 AM
Is your lava2 copy of lava a progressive JPEG?

Make sure that your shaderfile has been added to shaderlist.txt.

Mr. Chopper
09-04-2003, 10:20 PM
I don't know if it is or not.......my first guess would be to say no, since the texture I copied already existed in the game (imp_mine/lava2).

Eldritch
09-05-2003, 04:31 AM
If you literally just copied and pasted the file from one location to the other, it should be fine.

When the map loads up, bring down the console and check for any errors (they should appear in yellow text)... it might say something to the effect of "file not found" or some type of shader error. If so, post what it is.