Init.
This commit is contained in:
49
Source/Rendering/ColorRectShader.cs
Executable file
49
Source/Rendering/ColorRectShader.cs
Executable file
@@ -0,0 +1,49 @@
|
||||
namespace DaggerFramework.Rendering
|
||||
{
|
||||
public class ColorRectShader : Shader
|
||||
{
|
||||
public override string FragmentSource => @"
|
||||
#version 450
|
||||
layout(location = 0) out vec4 fsout_Color;
|
||||
layout (set = 0, binding = 0) uniform Uniforms
|
||||
{
|
||||
vec4 color;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
fsout_Color = color;
|
||||
}
|
||||
";
|
||||
|
||||
public override string VertexSource => @"
|
||||
#version 450
|
||||
layout(location = 0) in vec2 Position;
|
||||
|
||||
// uniform MatrixBlock
|
||||
// {
|
||||
// // mat4 model = mat4();
|
||||
// // mat4 view;
|
||||
// // mat4 proj;
|
||||
// mat4 transform = mat4(1.0, 1.0, 1.0, 1.0,
|
||||
// 1.0, 1.0, 1.0, 1.0,
|
||||
// 1.0, 1.0, 1.0, 1.0,
|
||||
// 1.0, 1.0, 1.0, 1.0);
|
||||
// };
|
||||
|
||||
// mat4 transform = mat4(1.0, 1.0, 0.0, 1.0,
|
||||
// 0.0, 1.0, 1.0, 1.0,
|
||||
// 0.0, 0.0, 1.0, 1.0,
|
||||
// 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
mat4 transform = mat4(1.0);
|
||||
|
||||
void main()
|
||||
{
|
||||
// gl_Position = proj * view * model * vec4(Position, 0, 1);
|
||||
// gl_Position = vec4(Position, 0, 1);
|
||||
gl_Position = transform * vec4(Position, 0, 1);
|
||||
}";
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user