To distract myself, I’m working on a small map, something I was sure would be a simple one day job, but I’ve run into an issue I have no idea how to approach. I just wanted to take quake 3’s concrete floor texture and take some, maybe all of the color out of the main texture. Step one to this, I have to look at the contents of “base_floor/concretefloor1” in the base_floor.shader
I found this:
textures/base_floor/concretefloor1
{
{
map textures/base_wall/chrome_env.tga
tcgen environment
rgbgen wave sin .25 0 0 0
}
{
map textures/base_floor/concretefloor1.tga
blendFunc GL_ZERO GL_SRC_ALPHA
tcmod scale .1 .1
rgbgen identity
}
{
map textures/base_floor/concretefloor1.tga
blendFunc GL_ONE GL_SRC_ALPHA
tcmod turb sin .5 1 0 1
rgbgen identity
}
{
map $lightmap
blendfunc gl_dst_color gl_zero
rgbgen identity
}
}
The problem I’m having is the shader only seems to reference the special effects of the concrete texture, not the actual concrete.jpg itself. I see that quake 3 has a concrete that’s clearly the one used in the game, and I’m sure it’s the base that all of these extra rendering passes are applied to…but…how can the shader, which is known to be good, use a texture it doesn’t reference? I’m not just…missing it, right? There’s no mention of concrete.jpg in there, right? I see there’s a ‘concretefloor1.tga’ referenced, but this is the part of the shader that gives the shader it’s shimmer effect, not the underlaying concrete texture.
I was hoping I could simply copy this shader, use all the same code, and just desaturate the concrete.jpg a little for dramatic effect, and let quake 3 do its thing, but I can’t do that if what I copy doesn’t reference the thing I’m going to be desaturating, right? How…is that shader possible? What I have up there is code DIRECTLY from quake 3’s shader file (which I assume is now GNU along with the rest of it, so it’s hopefully ok to post that code up here in an unedited form)
Also, I see the shaders tend to point to files ending in .tga, where there generally aren’t .tga files, but there are .jpg files by the same name which I believe are what appear in-game, regardless of not being specified fully. Does quake 3 automatically look for a jpg if it can’t find a tga by the same name?
Thanks, sorry I’m like the only person keeping this forum alive, but hopefully other people will find these threads useful sooner or later.
*** Edit
Looking through the shader manual while reviewing Id’s quake 3 shaders…
all of those lights in base_light that emit different colors…those colors never seem to be referenced or defined in the shaders. How on earth does quake 3 know what surface light color to emit if it’s not coded into the shaders? Just…What? What did they do?