First work with vulkano
This commit is contained in:
parent
cbadffc41f
commit
0597579115
36 changed files with 1059 additions and 1847 deletions
|
@ -1,8 +0,0 @@
|
|||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 fragColor;
|
||||
layout (location = 0) out vec4 outColor;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(fragColor, 1.0);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
#version 450
out gl_PerVertex {
vec4 gl_Position;
};
layout (location = 0) out vec3 fragColor;
vec2 positions[3] = vec2[](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
vec3 colors[3] = vec3[](
vec3(1.0, 0.0, 0.0),
vec3(0.0, 1.0, 0.0),
vec3(0.0, 0.0, 1.0)
);
void main() {
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
fragColor = colors[gl_VertexIndex];
}
|
|
@ -1,10 +1,9 @@
|
|||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects: enable
|
||||
|
||||
layout (location = 0) in vec3 fragColor;
|
||||
layout (location = 0) in vec3 color;
|
||||
|
||||
layout (location = 0) out vec4 outColor;
|
||||
layout (location = 0) out vec4 f_color;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(fragColor, 1.0);
|
||||
f_color = vec4(color, 1.0);
|
||||
}
|
|
@ -1 +1 @@
|
|||
#version 450
#extension GL_ARB_separate_shader_objects: enable
// NOTE: names must match the `Vertex` struct in Rust
layout (location = 0) in vec2 pos;
layout (location = 1) in vec3 color;
layout (location = 0) out vec3 fragColor;
out gl_PerVertex {
vec4 gl_Position;
};
void main() {
gl_Position = vec4(pos, 0.0, 1.0);
fragColor = color;
}
|
||||
#version 450
layout (location = 0) in vec2 position;
layout (location = 1) in vec3 color;
layout (location = 0) out vec3 fragColor;
void main() {
gl_Position = vec4(position, 0.0, 1.0);
fragColor = color;
}
|
Loading…
Add table
Add a link
Reference in a new issue