35 lines
821 B
V Shell
35 lines
821 B
V Shell
|
#version 150
|
||
|
#define VERTEX_SHADER
|
||
|
#define POSITION_TEX
|
||
|
|
||
|
#moj_import <util.glsl>
|
||
|
#moj_import <texture.glsl>
|
||
|
|
||
|
in vec3 Position;
|
||
|
in vec2 UV0;
|
||
|
|
||
|
uniform sampler2D Sampler0;
|
||
|
uniform vec2 ScreenSize;
|
||
|
uniform float GameTime;
|
||
|
uniform mat4 ModelViewMat;
|
||
|
uniform mat4 ProjMat;
|
||
|
|
||
|
out vec2 texCoord0;
|
||
|
|
||
|
void main() {
|
||
|
texCoord0 = UV0;
|
||
|
|
||
|
transform.position = Position;
|
||
|
transform.textureUV = UV0;
|
||
|
transform.gameTime = GameTime;
|
||
|
transform.guiScale = getGuiScale(ProjMat, ScreenSize);
|
||
|
transform.color = getVertexColor(Sampler0, gl_VertexID, texCoord0);
|
||
|
transform.textureColor = getVertexColor(Sampler0, gl_VertexID, texCoord0) * 255.0;
|
||
|
|
||
|
anchorZ(2, -2001);
|
||
|
paddingElement(Sampler0, gl_VertexID);
|
||
|
offsetElement(1.0, 0, -200);
|
||
|
gl_Position = ProjMat * ModelViewMat * vec4(transform.position, 1.0);
|
||
|
|
||
|
texCoord0 = transform.textureUV;
|
||
|
}
|