Jump to content

Home

Custom Shader


Mr. Chopper

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...