diff options
| author | raysan5 <raysan5@gmail.com> | 2016-03-30 20:09:16 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-03-30 20:09:16 +0200 |
| commit | 66b096d97848eb096a043781f1f305e7189f2a00 (patch) | |
| tree | cf87fdd3f4bc46dc93dcaa2f189a5d1dd1e3f32b /examples/resources | |
| parent | 1136d4222f81524c10b2319b325fcf1282bc6ec1 (diff) | |
| download | raylib-66b096d97848eb096a043781f1f305e7189f2a00.tar.gz raylib-66b096d97848eb096a043781f1f305e7189f2a00.zip | |
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.
Diffstat (limited to 'examples/resources')
| -rw-r--r-- | examples/resources/shaders/base.vs | 3 | ||||
| -rw-r--r-- | examples/resources/shaders/bloom.fs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/resources/shaders/base.vs b/examples/resources/shaders/base.vs index b0f930b7..9b8cca69 100644 --- a/examples/resources/shaders/base.vs +++ b/examples/resources/shaders/base.vs @@ -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); }
\ No newline at end of file diff --git a/examples/resources/shaders/bloom.fs b/examples/resources/shaders/bloom.fs index 2833ce33..0a73161a 100644 --- a/examples/resources/shaders/bloom.fs +++ b/examples/resources/shaders/bloom.fs @@ -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 |
