realityplayground-of/zoneb/bin/data/shaders/particles/draw.vert

25 lines
637 B
GLSL
Executable file

uniform mat4 modelViewProjectionMatrix;
uniform sampler2DRect particles0;
uniform sampler2DRect particles1;
uniform sampler2DRect particles2;
uniform sampler2DRect particles3;
in vec4 position;
in vec2 texcoord;
out vec2 texCoordVarying;
out vec3 vPos;
out vec4 vTarget;
out float vTemperature;
out float vAge;
void main()
{
texCoordVarying = texcoord;
vec4 misc = texture(particles2, texCoordVarying);
vec4 vTarget = texture(particles3, texCoordVarying);
vTemperature = misc.x;
vAge = misc.y;
vPos = texture(particles0, texCoordVarying).xyz;
gl_Position = modelViewProjectionMatrix * vec4(vPos, 1.0);
}