roleplay/client/shader/ray.vert

25 lines
665 B
GLSL

#version 450
#extension GL_EXT_buffer_reference : require
#include "hex_common.glsl"
layout(location = 0) flat out vec4 color;
void main() {
if(gl_InstanceIndex == 0) {
color = vec4(1, 0, 0, 1);
if(gl_VertexIndex == 0) {
gl_Position = pc.context.proj * pc.context.view * pc.context.click_start;
} else {
gl_Position = pc.context.proj * pc.context.view * pc.context.click_end;
}
} else {
color = vec4(0, 1, 0, 1);
if(gl_VertexIndex == 0) {
gl_Position = pc.context.proj * pc.context.view * pc.context.hover_start;
} else {
gl_Position = pc.context.proj * pc.context.view * pc.context.hover_end;
}
}
}