Skip to content

Added precision qualifiers to resolve shader compilation errors on mobile devices. #1602

Closed
wants to merge 1 commit into from
View
2 examples/js/ShaderExtras.js
@@ -114,7 +114,7 @@ THREE.ShaderExtras = {
"uniform float cKernel[ KERNEL_SIZE ];",
"uniform sampler2D tDiffuse;",
- "uniform vec2 uImageIncrement;",
+ "uniform highp vec2 uImageIncrement;",
"varying vec2 vUv;",
View
4 src/renderers/WebGLRenderer.js
@@ -5392,8 +5392,8 @@ THREE.WebGLRenderer = function ( parameters ) {
parameters.shadowMapDebug ? "#define SHADOWMAP_DEBUG" : "",
parameters.shadowMapCascade ? "#define SHADOWMAP_CASCADE" : "",
- "uniform mat4 viewMatrix;",
- "uniform vec3 cameraPosition;",
+ "uniform highp mat4 viewMatrix;",
+ "uniform highp vec3 cameraPosition;",
""
].join("\n");
Something went wrong with that request. Please try again.