Added shapes to debug renderer
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user