diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-04 15:40:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 15:40:05 +0100 |
commit | 1504c961125c76f007bc2ff061c3854effbe3e56 (patch) | |
tree | 192a5581b86e46cc5f0cad7ab9709a33bc769174 /drivers/gles2/shaders | |
parent | 99c4faf83769f7016a8657ff6aa82ef26766fa14 (diff) | |
parent | 9f266cf7e5aa0c9953599453595a5720e9d0b08f (diff) |
Merge pull request #24539 from BastiaanOlij/override_gl_position
Override GL_position
Diffstat (limited to 'drivers/gles2/shaders')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 5cdf4ff04d..b2b9458ed2 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -354,6 +354,10 @@ void main() { uv2_interp = uv2_attrib; #endif +#ifdef OVERRIDE_POSITION + highp vec4 position; +#endif + #if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED) vertex = world_matrix * vertex; normal = normalize((world_matrix * vec4(normal, 0.0)).xyz); @@ -641,7 +645,12 @@ VERTEX_SHADER_CODE #endif //fog #endif //use vertex lighting + +#ifdef OVERRIDE_POSITION + gl_Position = position; +#else gl_Position = projection_matrix * vec4(vertex_interp, 1.0); +#endif } /* clang-format off */ |