diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-13 05:27:47 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-13 05:27:47 +0200 |
commit | 55ff3fddd8bee56fdec18612c7afd4863ac024e0 (patch) | |
tree | d2422898c42bdc263ca777ed19d26683b31020df /shaders/shader.vert | |
parent | b25f19d99a78099e10319983cb8230266a2c9870 (diff) |
shaders: wip
Diffstat (limited to 'shaders/shader.vert')
-rw-r--r-- | shaders/shader.vert | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/shaders/shader.vert b/shaders/shader.vert index 9190fe8d..88ed1e93 100644 --- a/shaders/shader.vert +++ b/shaders/shader.vert @@ -2,14 +2,20 @@ precision highp float; layout (location = 0) uniform vec2 scale; layout (location = 1) uniform vec3 offset; +layout (location = 2) uniform vec4 tint; +layout (location = 3) uniform bool enable_lightmap; layout (location = 0) in vec4 position; layout (location = 1) in vec2 texcoords; -layout (location = 2) in float depth; -noperspective out vec2 frag_texcoords; +layout (location = 2) in vec2 light_coord; +layout (location = 3) in float depth; + +layout (location = 0) noperspective out vec2 frag_texcoords; +layout (location = 1) noperspective out vec2 frag_light_coord; void main() { float x = -position.y, y = -position.x, z = position.z; gl_Position = vec4((x-y+offset.x)*scale.x, ((x+y+z*2)*0.578125-offset.y)*scale.y, offset.z + depth, 1); frag_texcoords = texcoords; + frag_light_coord = light_coord; } |