reorganized directory
This commit is contained in:
parent
9d507e38cb
commit
076355e2d1
35 changed files with 0 additions and 0 deletions
29
test/shaders/source/RawTriangle.vert.glsl
Normal file
29
test/shaders/source/RawTriangle.vert.glsl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#version 450 core
|
||||
|
||||
// Explicitly set the output location for Vulkan
|
||||
layout(location = 0) out vec4 vColor;
|
||||
|
||||
void main() {
|
||||
// Initialize with default values
|
||||
vec2 pos = vec2(0.0);
|
||||
vec4 color = vec4(0.0);
|
||||
|
||||
// Use Vulkan's gl_VertexIndex instead of gl_VertexID
|
||||
switch(gl_VertexIndex) {
|
||||
case 0:
|
||||
pos = vec2(-1.0, -1.0);
|
||||
color = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
break;
|
||||
case 1:
|
||||
pos = vec2(1.0, -1.0);
|
||||
color = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
break;
|
||||
case 2:
|
||||
pos = vec2(0.0, 1.0);
|
||||
color = vec4(0.0, 0.0, 1.0, 1.0);
|
||||
break;
|
||||
}
|
||||
|
||||
gl_Position = vec4(pos, 0.0, 1.0);
|
||||
vColor = color;
|
||||
}
|
||||
9
test/shaders/source/SolidColor.frag.glsl
Normal file
9
test/shaders/source/SolidColor.frag.glsl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#version 450 core
|
||||
|
||||
layout(location = 0) in vec4 Color; // Explicit location for fragment input
|
||||
layout(location = 0) out vec4 FragColor; // Explicit location for fragment output
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = Color;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue