2021-06-28 14:37:48 +04:30
|
|
|
#define LT_ENGINE_RESOURCES_QUAD_SHADER_VS \
|
|
|
|
R"(
|
|
|
|
+GLSL
|
|
|
|
#version 440 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 a_Position;
|
|
|
|
layout(location = 1) in vec4 a_Color;
|
|
|
|
|
2021-07-05 14:36:36 +04:30
|
|
|
layout(std140, binding = 0) uniform ub_ViewProjection
|
|
|
|
{
|
|
|
|
mat4 viewProjection;
|
|
|
|
};
|
2021-07-05 01:59:18 +04:30
|
|
|
|
2021-07-01 19:25:46 +04:30
|
|
|
out vec4 vso_FragmentColor;
|
2021-06-28 14:37:48 +04:30
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2021-07-05 14:36:36 +04:30
|
|
|
gl_Position = viewProjection * vec4(a_Position, 1.0);
|
2021-07-01 19:25:46 +04:30
|
|
|
vso_FragmentColor = a_Color;
|
2021-06-28 14:37:48 +04:30
|
|
|
}
|
|
|
|
-GLSL
|
2021-07-01 19:25:46 +04:30
|
|
|
|
|
|
|
|
2021-06-28 14:37:48 +04:30
|
|
|
+HLSL
|
|
|
|
struct VertexOut
|
|
|
|
{
|
|
|
|
float4 Color : COLOR;
|
|
|
|
float4 Position : SV_Position;
|
|
|
|
};
|
|
|
|
|
|
|
|
VertexOut main(float3 InPosition : POSITION, float4 InColor : COLOR)
|
|
|
|
{
|
|
|
|
VertexOut vso;
|
|
|
|
vso.Position = float4(InPosition.x, InPosition.y, InPosition.z, 1.0);
|
|
|
|
vso.Color = InColor;
|
2021-07-01 19:25:46 +04:30
|
|
|
|
2021-06-28 14:37:48 +04:30
|
|
|
return vso;
|
|
|
|
}
|
|
|
|
-HLSL)"
|
|
|
|
|
|
|
|
#define LT_ENGINE_RESOURCES_QUAD_SHADER_PS \
|
|
|
|
R"(
|
|
|
|
+GLSL
|
|
|
|
#version 440 core
|
|
|
|
|
2021-07-01 19:25:46 +04:30
|
|
|
in vec4 vso_FragmentColor;
|
2021-06-28 14:37:48 +04:30
|
|
|
|
2021-07-01 19:25:46 +04:30
|
|
|
out vec4 fso_FragmentColor;
|
2021-06-28 14:37:48 +04:30
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2021-07-01 19:25:46 +04:30
|
|
|
fso_FragmentColor = vso_FragmentColor;
|
2021-06-28 14:37:48 +04:30
|
|
|
}
|
|
|
|
-GLSL
|
2021-07-01 19:25:46 +04:30
|
|
|
|
|
|
|
|
2021-06-28 14:37:48 +04:30
|
|
|
+HLSL
|
|
|
|
float4 main(float4 Color : COLOR) : SV_Target
|
|
|
|
{
|
|
|
|
return Color;
|
|
|
|
}
|
|
|
|
-HLSL
|
|
|
|
)"
|