Browse Source

Updating refraction shader

David Catuhe 9 năm trước cách đây
mục cha
commit
8bef42caae

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.core.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1916 - 1916
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.max.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/preview release/babylon.noworker.js


+ 1 - 1
dist/preview release/what's new.md

@@ -1,6 +1,6 @@
 - 2.4.0:
 - 2.4.0:
   - **Major updates**
   - **Major updates**
-    - New refraction channel for Standardd material (including fresnel support). [See demo here](NEED FEATURE DEMO) ([deltakosh](https://github.com/deltakosh))
+    - New refraction channel for Standardd material (including fresnel support). [See demo here](http://www.babylonjs.com/Demos/refraction/) ([deltakosh](https://github.com/deltakosh))
   - **Updates**
   - **Updates**
     - New OnPickTrigger support for spritesManager ([deltakosh](https://github.com/deltakosh))
     - New OnPickTrigger support for spritesManager ([deltakosh](https://github.com/deltakosh))
   - **Bug fixes**
   - **Bug fixes**

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

@@ -865,7 +865,7 @@ void main(void) {
 
 
 	refractionVector.y = -refractionVector.y;
 	refractionVector.y = -refractionVector.y;
 
 
-	if (dot(refractionVector, viewDirectionW) < 0.01)
+	if (dot(refractionVector, viewDirectionW) < 1.0)
 	{
 	{
 		refractionColor = textureCube(refractionSampler, refractionVector).rgb * vRefractionInfos.x;
 		refractionColor = textureCube(refractionSampler, refractionVector).rgb * vRefractionInfos.x;
 	}
 	}