Files
wschod/game/res/shaders/chunk.vert
T
2025-06-02 20:48:19 +02:00

22 lines
382 B
GLSL

#version 100
attribute vec4 position;
attribute vec4 material;
varying vec2 f_uv;
varying vec4 f_material;
varying float f_height;
uniform mat4 view;
uniform mat4 projection;
uniform vec3 chunk_position;
void main ()
{
f_uv = position.xz / 4.0;
f_material = material;
f_height = position.y;
gl_Position = projection * view * (position + vec4(chunk_position, 0.0));
}