添加组件圆,添加可视化碰撞器渲染

This commit is contained in:
2025-06-24 17:24:56 +08:00
parent 0032814ed6
commit a32ce57503
19 changed files with 635 additions and 58 deletions

View File

@ -0,0 +1,49 @@
// Basic Line Texture Shader
#type vertex
#version 450 core
layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec4 a_Color;
layout(location = 2) in int a_EntityID;
layout(std140, binding = 0) uniform Camera
{
mat4 u_ViewProjection;
};
struct VertexOutput
{
vec4 Color;
};
layout (location = 0) out VertexOutput Output;
layout (location = 1) out flat int v_EntityID;
void main()
{
Output.Color = a_Color;
v_EntityID = a_EntityID;
gl_Position = u_ViewProjection * vec4(a_Position, 1.0);
}
#type fragment
#version 450 core
layout(location = 0) out vec4 o_Color;
layout(location = 1) out int o_EntityID;
struct VertexOutput
{
vec4 Color;
};
layout (location = 0) in VertexOutput Input;
layout (location = 1) in flat int v_EntityID;
void main()
{
o_Color = Input.Color;
o_EntityID = v_EntityID;
}