Shaders: check GL_OES_standard_derivatives extension, fixes #145

This commit is contained in:
Emux
2016-08-20 13:28:51 +03:00
parent c4d7b30f0d
commit 19338fab3a
3 changed files with 8 additions and 0 deletions
@@ -22,8 +22,12 @@ main(){
// last two bits hold the texture coordinates. // last two bits hold the texture coordinates.
v_st = abs(mod(dir, 4.0)) - 1.0; v_st = abs(mod(dir, 4.0)) - 1.0;
} }
$$ $$
#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable #extension GL_OES_standard_derivatives : enable
#endif
#ifdef GLES #ifdef GLES
precision highp float; precision highp float;
#endif #endif
@@ -29,7 +29,9 @@ main(){
$$ $$
#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable #extension GL_OES_standard_derivatives : enable
#endif
#ifdef GLES #ifdef GLES
precision highp float; precision highp float;
#endif #endif
@@ -29,7 +29,9 @@ main(){
$$ $$
#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable #extension GL_OES_standard_derivatives : enable
#endif
#ifdef GLES #ifdef GLES
precision highp float; precision highp float;
#endif #endif