Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/shaders/glsl/minimap.vs
#version 110 | #version 110 | ||||
uniform mat4 transform; | uniform mat4 transform; | ||||
uniform mat4 textureTransform; | uniform mat4 textureTransform; | ||||
uniform float pointSize; | uniform float pointSize; | ||||
#if MINIMAP_MASK | #if MINIMAP_MASK | ||||
uniform mat4 maskTextureTransform; | uniform mat4 maskTextureTransform; | ||||
varying vec2 v_maskUV; | varying vec2 v_maskUV; | ||||
#endif | #endif | ||||
#if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK | #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_MASK || MINIMAP_FLARE | ||||
attribute vec3 a_vertex; | attribute vec3 a_vertex; | ||||
attribute vec2 a_uv0; | attribute vec2 a_uv0; | ||||
#endif | #endif | ||||
#if MINIMAP_BASE || MINIMAP_LOS | #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_FLARE | ||||
varying vec2 v_tex; | varying vec2 v_tex; | ||||
#endif | #endif | ||||
#if MINIMAP_POINT | #if MINIMAP_POINT | ||||
attribute vec2 a_vertex; | attribute vec2 a_vertex; | ||||
attribute vec3 a_color; | attribute vec3 a_color; | ||||
varying vec3 color; | varying vec3 color; | ||||
#endif | #endif | ||||
#if MINIMAP_LINE | #if MINIMAP_LINE | ||||
attribute vec2 a_vertex; | attribute vec2 a_vertex; | ||||
#endif | #endif | ||||
void main() | void main() | ||||
{ | { | ||||
#if MINIMAP_BASE || MINIMAP_LOS | #if MINIMAP_BASE || MINIMAP_LOS || MINIMAP_FLARE | ||||
gl_Position = transform * vec4(a_vertex, 1.0); | gl_Position = transform * vec4(a_vertex, 1.0); | ||||
v_tex = (textureTransform * vec4(a_uv0, 0.0, 1.0)).xy; | v_tex = (textureTransform * vec4(a_uv0, 0.0, 1.0)).xy; | ||||
#endif | #endif | ||||
#if MINIMAP_MASK | #if MINIMAP_MASK | ||||
v_maskUV = (maskTextureTransform * vec4(a_uv0, 0.0, 1.0)).xy; | v_maskUV = (maskTextureTransform * vec4(a_uv0, 0.0, 1.0)).xy; | ||||
#endif | #endif | ||||
Show All 10 Lines |
Wildfire Games · Phabricator