Fixing vertex lighting bug?


(G0-Gerbil) #1

Throughout all versions there’s always been a problem with vertex-lighting.

Basically, any texture that goes via a shader shows fullbright in vertex-lit mode. Most clan players use this mode as opposed to lightmapping because of the huge tactical advantage it gives (try MP_Castle with and without to see the difference :/).
However, it was intended for people with slower computers, not to give an unfair advantage, that also makes the game look like a dog’s dinner.

However, I am not sure if this is a compiling issue or a game-engine issue, but thought I’d see what you guys think.

I CAN, with a horrible fix, get most of my shaders to be properly vertex lit / lightmapped in the correct manner, but what I need to do is this:

Create shader as normal.
Compile
Delete shader reference entirely from shader script.
Run in wolf.

This only works for normal opaque textures - obviously without the shader file the game loses all info about it (although for some reason remembers the sound it makes when you walk on it luckily enough).

It is, of course, completely a hack, but I don’t want my maps to be completely bright when run in vertex mode - vertex lighting can be quite atmospheric, even if it’s not as sharp as lightmapping.

Is there some means of fixing this in Q3map2? IE is it a compiling issue (or can be fixed by one), or is it simply a badly done engine? :wink:


(ydnar) #2

This is a (mostly) engine related issue.

You could append “:q3map” to the end of your shaders’ names, and then they’ll only be used by Q3Map2:

textures/foobar/wood

becomes

textures/foobar/wood:q3map

BUT, make sure that the brush(es) use

textures/foobar/wood

y


(G0-Gerbil) #3

Ah OK cheers - ReyalP had posted that but I think I misunderstood the intention there.

Any chance of saying what info gets stored from a shader at compile time?
What surfaceparms? As I’ve noted above - the type (for sound effects) seems to - would be useful to know what else can and can’t be used in this manner.


(ydnar) #4

Surfaceparms get stored in the BSP shader lump, so in that context, using a :q3map shader is fine.

y


(G0-Gerbil) #5

Muchos gracias :slight_smile:


(hummer) #6

So, what if we want to use textures that come with wolf, that already have shaders?

For example, say a we have a fictional wolf shader called textures/chateau/wood_1…

Do we then make our own shader, textures/chateau/wood_1:q3map? Does this override the default shader?

I guess what I’m asking is, for using textures that come with the game, do we have to repackage the textures with new shaders, or can we do a simple shaderfix and call it good?