Removes unused minimap shader variants.
This was SVN commit r27130.
This commit is contained in:
parent
ef9057239a
commit
61019c0e91
@ -1,21 +1,8 @@
|
||||
!!ARBfp1.0
|
||||
|
||||
#if MINIMAP_MASK
|
||||
ATTRIB v_maskUV = fragment.texcoord[1];
|
||||
TEMP mask;
|
||||
TEX mask, v_maskUV, texture[2], 2D;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_BASE
|
||||
#if MINIMAP_MASK
|
||||
TEMP color;
|
||||
TEX color, fragment.texcoord[0], texture[0], 2D;
|
||||
MUL color.a, color.a, mask.a;
|
||||
MOV result.color, color;
|
||||
#else
|
||||
TEX result.color, fragment.texcoord[0], texture[0], 2D;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LOS
|
||||
TEMP tex;
|
||||
@ -33,9 +20,4 @@
|
||||
MOV result.color.a, 1.0;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LINE
|
||||
PARAM color = program.local[1];
|
||||
MOV result.color, color;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
@ -2,14 +2,11 @@
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
PARAM textureTransform[4] = { program.local[4..7] };
|
||||
#if MINIMAP_MASK
|
||||
PARAM maskTextureTransform[4] = { program.local[12..15] };
|
||||
#endif
|
||||
OUTPUT v_tex = result.texcoord[0];
|
||||
|
||||
TEMP position;
|
||||
MOV position, vertex.position;
|
||||
#if MINIMAP_POINT || MINIMAP_LINE
|
||||
#if MINIMAP_POINT
|
||||
MOV position.z, 0.0;
|
||||
#endif
|
||||
MOV position.w, 1.0;
|
||||
@ -19,7 +16,7 @@ DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
#if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK
|
||||
#if MINIMAP_BASE || MINIMAP_LOS
|
||||
TEMP tex;
|
||||
MOV tex, vertex.texcoord;
|
||||
#endif
|
||||
@ -35,14 +32,4 @@ DP4 result.position.w, transform[3], position;
|
||||
MOV result.color, vertex.color;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_MASK
|
||||
OUTPUT v_maskUV = result.texcoord[1];
|
||||
MOV v_maskUV.x, tex.x;
|
||||
MOV v_maskUV.y, tex.y;
|
||||
DP4 v_maskUV.x, maskTextureTransform[0], tex;
|
||||
DP4 v_maskUV.y, maskTextureTransform[1], tex;
|
||||
DP4 v_maskUV.z, maskTextureTransform[2], tex;
|
||||
DP4 v_maskUV.w, maskTextureTransform[3], tex;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
@ -3,17 +3,14 @@
|
||||
|
||||
<vertex file="arb/minimap.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0" if="MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK"/>
|
||||
<stream name="uv0" if="MINIMAP_BASE || MINIMAP_LOS"/>
|
||||
<stream name="color" if="MINIMAP_POINT"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="textureTransform" loc="4" type="mat4"/>
|
||||
<uniform name="maskTextureTransform" loc="8" type="mat4" if="MINIMAP_MASK"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/minimap.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D" if="MINIMAP_BASE || MINIMAP_LOS"/>
|
||||
<uniform name="color" loc="1" type="vec4" if="MINIMAP_LINE"/>
|
||||
<uniform name="maskTex" loc="2" type="sampler2D" if="MINIMAP_MASK"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
@ -5,34 +5,15 @@
|
||||
varying vec2 v_tex;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_MASK
|
||||
uniform sampler2D maskTex;
|
||||
varying vec2 v_maskUV;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_POINT
|
||||
varying vec3 color;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LINE
|
||||
uniform vec4 color;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
#if MINIMAP_MASK
|
||||
float mask = texture2D(maskTex, v_maskUV).a;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_BASE
|
||||
#if MINIMAP_MASK
|
||||
vec4 color = texture2D(baseTex, v_tex);
|
||||
gl_FragColor.rgb = color.rgb;
|
||||
gl_FragColor.a = color.a * mask;
|
||||
#else
|
||||
gl_FragColor = texture2D(baseTex, v_tex);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LOS
|
||||
gl_FragColor = texture2D(baseTex, v_tex).rrrr;
|
||||
@ -41,8 +22,4 @@ void main()
|
||||
#if MINIMAP_POINT
|
||||
gl_FragColor = vec4(color, 1.0);
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LINE
|
||||
gl_FragColor = color;
|
||||
#endif
|
||||
}
|
||||
|
@ -3,12 +3,7 @@
|
||||
uniform mat4 transform;
|
||||
uniform mat4 textureTransform;
|
||||
|
||||
#if MINIMAP_MASK
|
||||
uniform mat4 maskTextureTransform;
|
||||
varying vec2 v_maskUV;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK
|
||||
#if MINIMAP_BASE || MINIMAP_LOS
|
||||
attribute vec3 a_vertex;
|
||||
attribute vec2 a_uv0;
|
||||
#endif
|
||||
@ -23,10 +18,6 @@ uniform mat4 textureTransform;
|
||||
varying vec3 color;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LINE
|
||||
attribute vec2 a_vertex;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_POINT && USE_GPU_INSTANCING
|
||||
attribute vec2 a_uv1;
|
||||
attribute vec4 a_uv2;
|
||||
@ -41,10 +32,6 @@ void main()
|
||||
v_tex = (textureTransform * vec4(a_uv0, 0.0, 1.0)).xy;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_MASK
|
||||
v_maskUV = (maskTextureTransform * vec4(a_uv0, 0.0, 1.0)).xy;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_POINT
|
||||
#if USE_GPU_INSTANCING
|
||||
gl_Position = transform * vec4(a_vertex * width + a_uv1, 0.0, 1.0);
|
||||
@ -53,8 +40,4 @@ void main()
|
||||
#endif
|
||||
color = a_color;
|
||||
#endif // MINIMAP_POINT
|
||||
|
||||
#if MINIMAP_LINE
|
||||
gl_Position = transform * vec4(a_vertex, 0.0, 1.0);
|
||||
#endif
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<vertex file="glsl/minimap.vs">
|
||||
<stream name="pos" attribute="a_vertex"/>
|
||||
<stream name="uv0" attribute="a_uv0" if="MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK"/>
|
||||
<stream name="uv0" attribute="a_uv0" if="MINIMAP_BASE || MINIMAP_LOS"/>
|
||||
<stream name="uv1" attribute="a_uv1" if="USE_GPU_INSTANCING"/>
|
||||
<stream name="color" attribute="a_color" if="MINIMAP_POINT"/>
|
||||
</vertex>
|
||||
|
@ -48,9 +48,6 @@ X(DECAL)
|
||||
X(DISABLE_RECEIVE_SHADOWS)
|
||||
X(IGNORE_LOS)
|
||||
X(MINIMAP_BASE)
|
||||
X(MINIMAP_LINE)
|
||||
X(MINIMAP_LOS)
|
||||
X(MINIMAP_MASK)
|
||||
X(MINIMAP_POINT)
|
||||
X(MODE_SHADOWCAST)
|
||||
X(MODE_SILHOUETTEDISPLAY)
|
||||
|
Loading…
Reference in New Issue
Block a user