Lil Killa Posted November 11, 2003 Share Posted November 11, 2003 OK enought with the title biz... I took a quick look at the big fog shader in a text documnet and have a few questions... textures/fogs/yavin2 { qer_editorimage textures/fogs/fog.tga surfaceparm nonsolid surfaceparm nonopaque surfaceparm fog fogparms ( 0.7 0.6 0.5 ) 3900.0 I want to know what the bold part does. I am guessing the numbers in ()'s are RGB values but what does the second number (3900.0) do? Link to comment Share on other sites More sharing options...
Business_Eskimo Posted November 11, 2003 Share Posted November 11, 2003 Originally posted by wedge2211 The line surfaceparm fog is what tells the game explicitly that this is a fog. The line fogparms ( 0.4 0.4 0.4 ) 8192 is what does the real work in the fog shader. The numbers in parentheses are the RGB color values of the fog. The last number is the maximum distance (in game units) that players can see before the fog totally obscures their vision. You can also map textures onto the surface of the fog to achieve an effect like the surface of water shaders. Look at one of the bespin fogs to see this done. If you have this fog in your entire level, you can add the key/value distancecull 8192 to your worldspawn and nothing beyond the cutoff distance will be drawn in-game, saving your processor a little. For more on this, see the q3map2 foghull guide. [/b] Link to comment Share on other sites More sharing options...
Lil Killa Posted November 11, 2003 Author Share Posted November 11, 2003 Thanks Eskimo Link to comment Share on other sites More sharing options...
Lil Killa Posted November 11, 2003 Author Share Posted November 11, 2003 OK I have a problem.... I made the following fog shader and It it messing up everything else when I out it in my shaders folder. textures/cath/cathfog1 { qer_editorimage textures/fogs/fog.tga surfaceparm nonsolid surfaceparm nonopaque surfaceparm fog fogparms ( 135.0 158.0 167.0 ) 1536.0 What am I doing wrong? Link to comment Share on other sites More sharing options...
GothiX Posted November 11, 2003 Share Posted November 11, 2003 You're missing a "}" at the end? Link to comment Share on other sites More sharing options...
Lil Killa Posted November 11, 2003 Author Share Posted November 11, 2003 Amazing how something so simple can be overlooked Thanks It doesn't screw everything else up anymore.. Now to test the fog itself.. Link to comment Share on other sites More sharing options...
RalKon Posted November 11, 2003 Share Posted November 11, 2003 a little extra resource for understanding shaders that I found a while back http://qeradiant.com/manual/Q3AShader_Manual/ it reads like stereo instructions, but it does help a little Link to comment Share on other sites More sharing options...
Lil Killa Posted November 11, 2003 Author Share Posted November 11, 2003 Thanks but I've known about that for Aa long time. The only thing is I don't understand 90% of it... Link to comment Share on other sites More sharing options...
wedge2211 Posted November 11, 2003 Share Posted November 11, 2003 It's much more readable if you're actually looking for something specific...like figuring out what tcmod turb does or the fogparms line you mentioned. But for most practical instruction in shader coding...it's better to look at codes that work and figure out how they do what they do (or just cannibalize their codes). Link to comment Share on other sites More sharing options...
idontlikegeorge Posted November 12, 2003 Share Posted November 12, 2003 Originally posted by Lil Killa OK I have a problem.... I made the following fog shader and It it messing up everything else when I out it in my shaders folder. textures/cath/cathfog1 { qer_editorimage textures/fogs/fog.tga surfaceparm nonsolid surfaceparm nonopaque surfaceparm fog fogparms ( 135.0 158.0 167.0 ) 1536.0 What am I doing wrong? I dunno if you fixed it or not, but most examples had the RGB settings "normalized" at 0.0 to 1.0. Perhaps that's giving yours trouble? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.