Browse Source

Moving shaders to highp to address iOS8

David Catuhe 11 năm trước cách đây
mục cha
commit
3af9524d5a
33 tập tin đã thay đổi với 90 bổ sung73 xóa
  1. 4 4
      Babylon/Math/babylon.math.js
  2. 1 1
      Babylon/Math/babylon.math.ts
  3. 1 1
      Babylon/Shaders/anaglyph.fragment.fx
  4. 1 1
      Babylon/Shaders/blackAndWhite.fragment.fx
  5. 1 1
      Babylon/Shaders/blur.fragment.fx
  6. 1 1
      Babylon/Shaders/color.fragment.fx
  7. 1 1
      Babylon/Shaders/color.vertex.fx
  8. 1 1
      Babylon/Shaders/convolution.fragment.fx
  9. 1 1
      Babylon/Shaders/default.fragment.fx
  10. 1 1
      Babylon/Shaders/default.vertex.fx
  11. 1 1
      Babylon/Shaders/displayPass.fragment.fx
  12. 1 1
      Babylon/Shaders/filter.fragment.fx
  13. 1 1
      Babylon/Shaders/fxaa.fragment.fx
  14. 1 1
      Babylon/Shaders/layer.fragment.fx
  15. 1 1
      Babylon/Shaders/layer.vertex.fx
  16. 1 1
      Babylon/Shaders/legacydefault.fragment.fx
  17. 1 1
      Babylon/Shaders/legacydefault.vertex.fx
  18. 1 1
      Babylon/Shaders/lensFlare.fragment.fx
  19. 1 1
      Babylon/Shaders/lensFlare.vertex.fx
  20. 1 1
      Babylon/Shaders/oculusDistortionCorrection.fragment.fx
  21. 1 1
      Babylon/Shaders/outline.fragment.fx
  22. 1 1
      Babylon/Shaders/outline.vertex.fx
  23. 1 1
      Babylon/Shaders/particles.fragment.fx
  24. 1 1
      Babylon/Shaders/particles.vertex.fx
  25. 1 1
      Babylon/Shaders/pass.fragment.fx
  26. 1 1
      Babylon/Shaders/postprocess.vertex.fx
  27. 1 1
      Babylon/Shaders/refraction.fragment.fx
  28. 1 1
      Babylon/Shaders/shadowMap.fragment.fx
  29. 1 1
      Babylon/Shaders/shadowMap.vertex.fx
  30. 1 1
      Babylon/Shaders/sprites.fragment.fx
  31. 1 1
      Babylon/Shaders/sprites.vertex.fx
  32. 47 30
      babylon.1.14-beta-debug.js
  33. 9 9
      babylon.1.14-beta.js

+ 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

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 47 - 30
babylon.1.14-beta-debug.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 9 - 9
babylon.1.14-beta.js