Files
Nuake/Resources/Shaders/line.shader
Antoine Pilote d3ec4e1c02 Better Gizmos
Gizmos now display half opacity when occluded, same for lines
Improved editor camera, should keep updating even if not controlled
Viewport should not grab input when another imgui element is over it
2023-10-09 15:22:39 -04:00

34 lines
620 B
GLSL

#shader vertex
#version 440 core
layout(location = 0) in vec3 VertexPosition;
layout(location = 1) in vec4 VertexColor;
uniform mat4 u_Projection;
uniform mat4 u_View;
uniform mat4 u_Model;
out vec4 LineColor;
void main()
{
LineColor = VertexColor;
gl_Position = u_Projection * u_View * vec4(VertexPosition, 1.0f);
}
#shader fragment
#version 440 core
in vec4 LineColor;
layout(location = 0) out vec4 FragColor;
layout(location = 1) out int gEntityID;
uniform float u_Opacity;
uniform int u_EntityID;
void main()
{
FragColor = LineColor * vec4(1, 1, 1, u_Opacity);
gEntityID = int(u_EntityID);
}