Added shapes to debug renderer

This commit is contained in:
Antoine Pilote
2024-08-16 17:55:35 -04:00
parent 1685921a5a
commit 4d1feb9802
19 changed files with 36028 additions and 200 deletions

View File

@@ -42,6 +42,11 @@ void main()
vec4 px_color = texture(gizmo_texture, a_UV).rgba;
color = px_color * vec4(1, 1, 1, u_Opacity);
if(color.a == 0.0f)
{
discard;
}
if(u_Opacity >= 0.5f)
{
gEntityID = u_EntityID;

View File

@@ -26,9 +26,18 @@ layout(location = 1) out int gEntityID;
uniform float u_Opacity;
uniform int u_EntityID;
uniform vec4 u_Color;
void main()
{
FragColor = LineColor * vec4(1, 1, 1, u_Opacity);
if(u_Color == vec4(0, 0, 0, 0))
{
FragColor = LineColor * vec4(1, 1, 1, u_Opacity);
}
else
{
FragColor = u_Color;
}
gEntityID = int(u_EntityID);
}