dot2 blending problem


(Godmil) #1

I was just optimising an old map where I had a dotproduct2 blending on every surface. I decided to replace the shaders on the surfaces that didn’t have any blending to a nonblended version (which gives a great boost to FPS over the whole map). However I’m having trouble linking the blended to nonblended versions of each shader.

there are two problems: 1. the top texture (grass - which is getting blended) never appears totally solid (its always semitransparent). and 2. I cant get the base textures to tile properly between a vertical surface and the angled one.

the second prob isn’t that important, but if anyone can help me with the first I’d be very grateful. :slight_smile:

Here are a couple of pics of the problems: pic1 pic2

Here is the shader file.
And this is a wee example map of it.

Thanks :slight_smile:


(ydnar) #2

You’ll need to use 1.0 in the end of the dp2 line in order to have it blend between a completely normal 2-pass shader at the top.

q3map_alphaMod dotproduct2 ( 0 0 1 )

y


(Godmil) #3

Ahhh yes, that makes sense :smiley:

funny, its still got a kinda glossyness to it… ah, but its hardly noticable :slight_smile:

Thanks y <3


(ydnar) #4

Incidentally, don’t use tcMod scale 1 1. You’re just burning unecessary CPU cycles.

Your last shader uses a tcMod scale 0.25 0.25 for only one stage. You can move that to q3map_tcMod scale to save runtime calculations.

y


(Godmil) #5

:smiley: thanks