Page 1 of 1

Fog shader

Posted: Mon Jul 06, 2015 2:05 am
by Bacon
So I want to use a custom fog shader in a map. Here's the shader:

Code: Select all

textures/bacon/seafog
{
	qer_editorimage textures/sfx/fog_blue.tga
	surfaceparm	trans
	surfaceparm	nonsolid
	surfaceparm	fog
	surfaceparm	nolightmap
	qer_nocarve
	fogparms ( 0.4 0.5 0.9 ) 384

}
I took this shader directly from another fog shader, which I tested in game, and works. However when I try mine, it shows notex on the fog brush, and the console says "trying seafog.TGA". The other for shader I took it from (q3wcp16), does not have a "seafog.tga" in the textures folder for that map. Am I missing something here? Why doesn't this work? I tried renaming "seafog" to other words and I get the same result.

I could just use q3wcp16's fog shader, but the problem is I need a different distance to opaque than that one uses.

Re: Fog shader

Posted: Mon Jul 06, 2015 8:06 am
by Eraser
It says "trying seafog.tga" because if the shader "seafog" doesn't exist, it'll look for an actual texture file with that name.

Re: Fog shader

Posted: Mon Jul 06, 2015 9:05 am
by CZghost
@Bacon: First, did you include your shader file to shaderlist.txt? If so, you should see a white border arond the shader image (in your case the missing one) - this means it is a shader and compiler will consider it as shader and take its parameters.
Second: If you want to have the texture with FOG written on the surface in the editor, you must take the existing one (in your case the blue one) or make one yourself. For using default you have to specify qer_editorimage general directive in the shader, if you want to make your own editor texture, best is to name it like the shader (unless you have much more fog shaders that have similar settings)...

Re: Fog shader

Posted: Mon Jul 06, 2015 11:49 am
by KittenIgnition
Did you use seafog, or bacon/seafog? If it's trying seafog, it's looking for textures/seafog, not textures/bacon/seafog.

Re: Fog shader

Posted: Mon Jul 06, 2015 6:05 pm
by Bacon
Well it worked finally after I renamed my shader file bacon.shader to zzbacon.shader. :confused: This game is wack. Thanks for the help though anyways guys.