Working on basic rendering #4

* Added a basic material abstraction
* Started implementation of RenderTarget (such as render textures)
This commit is contained in:
2022-06-04 18:26:58 +02:00
parent d9f0f40ad9
commit d019155d10
20 changed files with 633 additions and 452 deletions

View 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;
}

View File

@ -0,0 +1,11 @@
#version 440 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
void main(){
FragColor = texture(screenTexture, aTexCoords);
}