add FrameBuffer Object
This commit is contained in:
parent
18bb7ab823
commit
eda25cf2c9
7 changed files with 304 additions and 227 deletions
12
res/shaders/fbo.frag
Normal file
12
res/shaders/fbo.frag
Normal file
|
@ -0,0 +1,12 @@
|
|||
#version 150
|
||||
//Il n’y a pas de layout(location=i) dans OpenGL < 3.3, mais tu peux utiliser glFragData[i] = myvalue à la place.
|
||||
uniform sampler2D materialTex;
|
||||
|
||||
in vec2 fragTexCoord;
|
||||
in vec3 fragVert;
|
||||
|
||||
out vec4 finalColor;
|
||||
|
||||
void main() {
|
||||
finalColor = texture(materialTex, fragTexCoord);
|
||||
}
|
Reference in a new issue