Added some test shaders started working on constructing a graphics pipeline

This commit is contained in:
Warwick 2022-11-09 15:40:36 +00:00
parent ce710dcd24
commit 191aa7350d
5 changed files with 36 additions and 0 deletions

3
compile_shaders.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
glslc shaders/shader.vert -o shaders/shader.vert.spv
glslc shaders/shader.frag -o shaders/shader.vert.spv

7
shaders/shader.frag Normal file
View file

@ -0,0 +1,7 @@
#version 450
layout (location = 0) out vec4 outColor;
void main() {
outColor = vec4(0.0, 1.0, 0.0, 1.0);
}

11
shaders/shader.vert Normal file
View file

@ -0,0 +1,11 @@
#version 450
vec2 positions[3] = vec2[] (
vec2(0.0,-0.5),
vec2(0.5,0.5),
vec2(-0.5,0.5)
);
void main() {
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}

BIN
shaders/shader.vert.spv Normal file

Binary file not shown.

View file

@ -0,0 +1,15 @@
#pragma once
#include<string>
namespace yave {
class YaveGrPipeline {
public:
YaveGrPipeline(const std::string& vertFilepath, const std::string& fragFilepath);
private:
};
} // namespace yave