Changeset 27130
- Timestamp:
- Oct 8, 2022, 12:52:23 AM (22 months ago)
- Location:
- ps/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/shaders/arb/minimap.fp
r26906 r27130 1 1 !!ARBfp1.0 2 2 3 #if MINIMAP_MASK4 ATTRIB v_maskUV = fragment.texcoord[1];5 TEMP mask;6 TEX mask, v_maskUV, texture[2], 2D;7 #endif8 9 3 #if MINIMAP_BASE 10 #if MINIMAP_MASK11 TEMP color;12 TEX color, fragment.texcoord[0], texture[0], 2D;13 MUL color.a, color.a, mask.a;14 MOV result.color, color;15 #else16 4 TEX result.color, fragment.texcoord[0], texture[0], 2D; 17 #endif18 5 #endif 19 6 … … 34 21 #endif 35 22 36 #if MINIMAP_LINE37 PARAM color = program.local[1];38 MOV result.color, color;39 #endif40 41 23 END -
ps/trunk/binaries/data/mods/public/shaders/arb/minimap.vp
r26493 r27130 3 3 PARAM transform[4] = { program.local[0..3] }; 4 4 PARAM textureTransform[4] = { program.local[4..7] }; 5 #if MINIMAP_MASK6 PARAM maskTextureTransform[4] = { program.local[12..15] };7 #endif8 5 OUTPUT v_tex = result.texcoord[0]; 9 6 10 7 TEMP position; 11 8 MOV position, vertex.position; 12 #if MINIMAP_POINT || MINIMAP_LINE9 #if MINIMAP_POINT 13 10 MOV position.z, 0.0; 14 11 #endif … … 20 17 DP4 result.position.w, transform[3], position; 21 18 22 #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK19 #if MINIMAP_BASE || MINIMAP_LOS 23 20 TEMP tex; 24 21 MOV tex, vertex.texcoord; … … 36 33 #endif 37 34 38 #if MINIMAP_MASK39 OUTPUT v_maskUV = result.texcoord[1];40 MOV v_maskUV.x, tex.x;41 MOV v_maskUV.y, tex.y;42 DP4 v_maskUV.x, maskTextureTransform[0], tex;43 DP4 v_maskUV.y, maskTextureTransform[1], tex;44 DP4 v_maskUV.z, maskTextureTransform[2], tex;45 DP4 v_maskUV.w, maskTextureTransform[3], tex;46 #endif47 48 35 END -
ps/trunk/binaries/data/mods/public/shaders/arb/minimap.xml
r26493 r27130 4 4 <vertex file="arb/minimap.vp"> 5 5 <stream name="pos"/> 6 <stream name="uv0" if="MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK"/>6 <stream name="uv0" if="MINIMAP_BASE || MINIMAP_LOS"/> 7 7 <stream name="color" if="MINIMAP_POINT"/> 8 8 <uniform name="transform" loc="0" type="mat4"/> 9 9 <uniform name="textureTransform" loc="4" type="mat4"/> 10 <uniform name="maskTextureTransform" loc="8" type="mat4" if="MINIMAP_MASK"/>11 10 </vertex> 12 11 13 12 <fragment file="arb/minimap.fp"> 14 13 <uniform name="baseTex" loc="0" type="sampler2D" if="MINIMAP_BASE || MINIMAP_LOS"/> 15 <uniform name="color" loc="1" type="vec4" if="MINIMAP_LINE"/>16 <uniform name="maskTex" loc="2" type="sampler2D" if="MINIMAP_MASK"/>17 14 </fragment> 18 15 -
ps/trunk/binaries/data/mods/public/shaders/glsl/minimap.fs
r26906 r27130 6 6 #endif 7 7 8 #if MINIMAP_MASK9 uniform sampler2D maskTex;10 varying vec2 v_maskUV;11 #endif12 13 8 #if MINIMAP_POINT 14 9 varying vec3 color; 15 10 #endif 16 11 17 #if MINIMAP_LINE18 uniform vec4 color;19 #endif20 21 12 void main() 22 13 { 23 #if MINIMAP_MASK24 float mask = texture2D(maskTex, v_maskUV).a;25 #endif26 27 14 #if MINIMAP_BASE 28 #if MINIMAP_MASK29 vec4 color = texture2D(baseTex, v_tex);30 gl_FragColor.rgb = color.rgb;31 gl_FragColor.a = color.a * mask;32 #else33 15 gl_FragColor = texture2D(baseTex, v_tex); 34 #endif35 16 #endif 36 17 … … 42 23 gl_FragColor = vec4(color, 1.0); 43 24 #endif 44 45 #if MINIMAP_LINE46 gl_FragColor = color;47 #endif48 25 } -
ps/trunk/binaries/data/mods/public/shaders/glsl/minimap.vs
r26901 r27130 4 4 uniform mat4 textureTransform; 5 5 6 #if MINIMAP_MASK 7 uniform mat4 maskTextureTransform; 8 varying vec2 v_maskUV; 9 #endif 10 11 #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK 6 #if MINIMAP_BASE || MINIMAP_LOS 12 7 attribute vec3 a_vertex; 13 8 attribute vec2 a_uv0; … … 22 17 attribute vec3 a_color; 23 18 varying vec3 color; 24 #endif25 26 #if MINIMAP_LINE27 attribute vec2 a_vertex;28 19 #endif 29 20 … … 42 33 #endif 43 34 44 #if MINIMAP_MASK45 v_maskUV = (maskTextureTransform * vec4(a_uv0, 0.0, 1.0)).xy;46 #endif47 48 35 #if MINIMAP_POINT 49 36 #if USE_GPU_INSTANCING … … 54 41 color = a_color; 55 42 #endif // MINIMAP_POINT 56 57 #if MINIMAP_LINE58 gl_Position = transform * vec4(a_vertex, 0.0, 1.0);59 #endif60 43 } -
ps/trunk/binaries/data/mods/public/shaders/glsl/minimap.xml
r26901 r27130 4 4 <vertex file="glsl/minimap.vs"> 5 5 <stream name="pos" attribute="a_vertex"/> 6 <stream name="uv0" attribute="a_uv0" if="MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK"/>6 <stream name="uv0" attribute="a_uv0" if="MINIMAP_BASE || MINIMAP_LOS"/> 7 7 <stream name="uv1" attribute="a_uv1" if="USE_GPU_INSTANCING"/> 8 8 <stream name="color" attribute="a_color" if="MINIMAP_POINT"/> -
ps/trunk/source/ps/CStrInternStatic.h
r26906 r27130 49 49 X(IGNORE_LOS) 50 50 X(MINIMAP_BASE) 51 X(MINIMAP_LINE)52 X(MINIMAP_LOS)53 X(MINIMAP_MASK)54 51 X(MINIMAP_POINT) 55 52 X(MODE_SHADOWCAST)
Note:
See TracChangeset
for help on using the changeset viewer.