2021-06-15 09:39:11 +04:30
|
|
|
+GLSL
|
2021-06-13 19:35:48 +04:30
|
|
|
#version 440 core
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 a_Position;
|
|
|
|
layout(location = 1) in vec4 a_Color;
|
|
|
|
|
|
|
|
out vec4 fragColor;
|
2021-05-31 23:28:29 +04:30
|
|
|
|
2021-06-13 19:35:48 +04:30
|
|
|
void main()
|
2021-05-31 23:28:29 +04:30
|
|
|
{
|
2021-06-13 19:35:48 +04:30
|
|
|
gl_Position = vec4(a_Position, 1.0);
|
|
|
|
fragColor = a_Color;
|
2021-06-15 09:39:11 +04:30
|
|
|
}
|
|
|
|
-GLSL
|
|
|
|
+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;
|
|
|
|
return vso;
|
|
|
|
}
|
|
|
|
-HLSL
|