Patch mesh turns black


(Zer0_L0giC) #1

http://www.planetunreal.com/darkhorizons/!teamfiles/zer0-l0gic/misc/screenshots/shot0095.jpg

The patch behind the glass shadered brushes you look through also has the same glass shader and it turns black when you are behind it. If you look at another brush w/ the same shader through the same glass, it turns out fine. Anyone know why patches do that, and how to fix it. BTW, it is the glass shader from textures/base_wall/glass01 or something. Thanks


(ydnar) #2

The Quake 3 renderer doesn’t depth-sort transparent/translucent polygons, so if you have multiple overlapping surfaces that use non-communitive blending modes, then you will get rendering artifacts such as this.

Basically, if you want to have multiple layers of overlapping glass, then use one of these modes:

GL_DST_COLOR GL_ONE
GL_DST_COLOR GL_ZERO
GL_ONE GL_ONE

Basically what you want is a blending mode that gives you the same result, irrespective of the sorting order.

pixel = (texture * SRC mode) + (pixel * DST mode)

Break out an old algebra book… :smile:

y