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
This commit is contained in:
Antoine Pilote
2023-10-09 15:22:39 -04:00
parent 828f46713b
commit d3ec4e1c02
14 changed files with 122849 additions and 73485 deletions

View File

@@ -23,7 +23,8 @@ void main()
#shader fragment
#version 440 core
out vec4 FragColor;
layout(location = 0) out vec4 FragColor;
layout(location = 1) out int gEntityID;
in vec2 a_UV;
in mat4 o_Projection;
@@ -32,6 +33,7 @@ in vec4 o_FragPos;
uniform sampler2D u_DepthTexture;
uniform sampler2D gizmo_texture;
uniform float u_Opacity;
uniform int u_EntityID;
void main()
{
@@ -41,4 +43,6 @@ void main()
color = px_color * vec4(1, 1, 1, u_Opacity);
FragColor = color;
gEntityID = int(0);
}

View File

@@ -21,11 +21,14 @@ void main()
in vec4 LineColor;
out vec4 FragColor;
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);
}