Bläddra i källkod

Moving shaders to highp to address iOS8

David Catuhe 11 år sedan
förälder
incheckning
3af9524d5a

+ 4 - 4
Babylon/Math/babylon.math.js

@@ -920,8 +920,8 @@
             this.z = other.z;
             this.w = other.w;
         };
-		
-		Quaternion.prototype.copyFromFloats = function (x, y, z, w) {
+
+        Quaternion.prototype.copyFromFloats = function (x, y, z, w) {
             this.x = x;
             this.y = y;
             this.z = z;
@@ -968,9 +968,9 @@
         };
 
         Quaternion.prototype.toEulerAngles = function () {
-            var result = BABYLON.Vector3.Zero();
+            var result = Vector3.Zero();
 
-            Quaternion.toEulerAnglesToRef(result);
+            this.toEulerAnglesToRef(result);
 
             return result;
         };

+ 1 - 1
Babylon/Math/babylon.math.ts

@@ -891,7 +891,7 @@
             this.y = y;
             this.z = z;
             this.w = w;
-        };
+        }
 
         public add(other: Quaternion): Quaternion {
             return new Quaternion(this.x + other.x, this.y + other.y, this.z + other.z, this.w + other.w);

+ 1 - 1
Babylon/Shaders/anaglyph.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/blackAndWhite.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/blur.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/color.fragment.fx

@@ -1,4 +1,4 @@
-precision mediump float;
+precision highp float;
 
 uniform vec4 color;
 

+ 1 - 1
Babylon/Shaders/color.vertex.fx

@@ -1,4 +1,4 @@
-precision mediump float;
+precision highp float;
 
 // Attributes
 attribute vec3 position;

+ 1 - 1
Babylon/Shaders/convolution.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/default.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 #define MAP_EXPLICIT	0.

+ 1 - 1
Babylon/Shaders/default.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

+ 1 - 1
Babylon/Shaders/displayPass.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/filter.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/fxaa.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 #define FXAA_REDUCE_MIN   (1.0/128.0)

+ 1 - 1
Babylon/Shaders/layer.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/layer.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

+ 1 - 1
Babylon/Shaders/legacydefault.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 #define MAP_PROJECTION	4.

+ 1 - 1
Babylon/Shaders/legacydefault.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 #define MAP_EXPLICIT	0.

+ 1 - 1
Babylon/Shaders/lensFlare.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/lensFlare.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

+ 1 - 1
Babylon/Shaders/oculusDistortionCorrection.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/outline.fragment.fx

@@ -1,4 +1,4 @@
-precision mediump float;
+precision highp float;
 
 uniform vec3 color;
 

+ 1 - 1
Babylon/Shaders/outline.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attribute

+ 1 - 1
Babylon/Shaders/particles.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/particles.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

+ 1 - 1
Babylon/Shaders/pass.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/postprocess.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

+ 1 - 1
Babylon/Shaders/refraction.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Samplers

+ 1 - 1
Babylon/Shaders/shadowMap.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 vec4 pack(float depth)

+ 1 - 1
Babylon/Shaders/shadowMap.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attribute

+ 1 - 1
Babylon/Shaders/sprites.fragment.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 uniform bool alphaTest;

+ 1 - 1
Babylon/Shaders/sprites.vertex.fx

@@ -1,5 +1,5 @@
 #ifdef GL_ES
-precision mediump float;
+precision highp float;
 #endif
 
 // Attributes

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 47 - 30
babylon.1.14-beta-debug.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 9 - 9
babylon.1.14-beta.js