Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/shaders/glsl/minimap.fs
#version 110 | #version 110 | ||||
#if MINIMAP_BASE || MINIMAP_LOS | #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_FLARE | ||||
uniform sampler2D baseTex; | uniform sampler2D baseTex; | ||||
varying vec2 v_tex; | varying vec2 v_tex; | ||||
#endif | #endif | ||||
#if MINIMAP_MASK | #if MINIMAP_MASK | ||||
uniform sampler2D maskTex; | uniform sampler2D maskTex; | ||||
varying vec2 v_maskUV; | varying vec2 v_maskUV; | ||||
#endif | #endif | ||||
#if MINIMAP_POINT | #if MINIMAP_POINT | ||||
varying vec3 color; | varying vec3 color; | ||||
#endif | #endif | ||||
#if MINIMAP_LINE | #if MINIMAP_LINE || MINIMAP_FLARE | ||||
uniform vec4 color; | uniform vec4 color; | ||||
#endif | #endif | ||||
void main() | void main() | ||||
{ | { | ||||
#if MINIMAP_MASK | #if MINIMAP_MASK | ||||
float mask = texture2D(maskTex, v_maskUV).a; | float mask = texture2D(maskTex, v_maskUV).a; | ||||
#endif | #endif | ||||
Show All 11 Lines | void main() | ||||
#if MINIMAP_LOS | #if MINIMAP_LOS | ||||
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0 - texture2D(baseTex, v_tex).a); | gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0 - texture2D(baseTex, v_tex).a); | ||||
#endif | #endif | ||||
#if MINIMAP_POINT | #if MINIMAP_POINT | ||||
gl_FragColor = vec4(color, 1.0); | gl_FragColor = vec4(color, 1.0); | ||||
#endif | #endif | ||||
#if MINIMAP_FLARE | |||||
gl_FragColor = texture2D(baseTex, v_tex) * color; | |||||
#endif | |||||
#if MINIMAP_LINE | #if MINIMAP_LINE | ||||
gl_FragColor = color; | gl_FragColor = color; | ||||
#endif | #endif | ||||
} | } |
Wildfire Games · Phabricator