Fog shader

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
Bacon
Posts: 1477
Joined: Sat Jul 31, 2004 7:00 am

Fog shader

Post 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.
[b]CAPSLOCK IS ON[/b]
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: Fog shader

Post 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.
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Fog shader

Post 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)...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
KittenIgnition
Posts: 252
Joined: Sun Nov 06, 2011 11:11 pm

Re: Fog shader

Post by KittenIgnition »

Did you use seafog, or bacon/seafog? If it's trying seafog, it's looking for textures/seafog, not textures/bacon/seafog.
User avatar
Bacon
Posts: 1477
Joined: Sat Jul 31, 2004 7:00 am

Re: Fog shader

Post 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.
[b]CAPSLOCK IS ON[/b]
Post Reply