Working on basic rendering #4
* Added a basic material abstraction * Started implementation of RenderTarget (such as render textures)
This commit is contained in:
11
BarinkEngine/graphics/shaders/RenderSurfaceFrag.shader
Normal file
11
BarinkEngine/graphics/shaders/RenderSurfaceFrag.shader
Normal file
@ -0,0 +1,11 @@
|
||||
#version 440 core
|
||||
layout (location = 0) in vec2 aPos;
|
||||
layout (location = 1) in vec2 aTexCoords;
|
||||
|
||||
|
||||
out vec2 aTexCoords;
|
||||
|
||||
void main(){
|
||||
gl_Position = vec4(aPos.xy , 0.0 ,1.0);
|
||||
aTexCoords = aTexCoords;
|
||||
}
|
11
BarinkEngine/graphics/shaders/RenderSurfaceVert.shader
Normal file
11
BarinkEngine/graphics/shaders/RenderSurfaceVert.shader
Normal file
@ -0,0 +1,11 @@
|
||||
#version 440 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 TexCoords;
|
||||
|
||||
uniform sampler2D screenTexture;
|
||||
|
||||
|
||||
void main(){
|
||||
FragColor = texture(screenTexture, aTexCoords);
|
||||
}
|
Reference in New Issue
Block a user