add FrameBuffer Object
This commit is contained in:
parent
18bb7ab823
commit
eda25cf2c9
7 changed files with 304 additions and 227 deletions
18
res/shaders/fbo.vert
Normal file
18
res/shaders/fbo.vert
Normal file
|
@ -0,0 +1,18 @@
|
|||
#version 150
|
||||
|
||||
uniform mat4 projection;
|
||||
|
||||
in vec3 vert;
|
||||
in vec2 vertTexCoord;
|
||||
|
||||
out vec3 fragVert;
|
||||
out vec2 fragTexCoord;
|
||||
|
||||
void main() {
|
||||
// Pass some variables to the fragment shader
|
||||
fragTexCoord = vertTexCoord;
|
||||
fragVert = vert;
|
||||
|
||||
// Apply all matrix transformations to vert
|
||||
gl_Position = projection * vec4(vert, 1);
|
||||
}
|
Reference in a new issue