Added support for render to texture (use RenderTexture2D)

Now it's possible to render to texture, old postprocessing system will
be removed on next raylib version.
This commit is contained in:
raysan5 2016-03-30 20:09:16 +02:00
parent 1136d4222f
commit 66b096d978
8 changed files with 210 additions and 13 deletions

View file

@ -3,8 +3,10 @@
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
in vec4 vertexColor;
out vec2 fragTexCoord;
out vec4 fragTintColor;
uniform mat4 mvpMatrix;
@ -13,6 +15,7 @@ uniform mat4 mvpMatrix;
void main()
{
fragTexCoord = vertexTexCoord;
fragTintColor = vertexColor;
gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
}

View file

@ -1,11 +1,12 @@
#version 330
in vec2 fragTexCoord;
in vec4 fragTintColor;
out vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 fragTintColor;
//uniform vec4 fragTintColor;
// NOTE: Add here your custom variables