Browse Source

Merge pull request #13474 from msimpson/dev

Correct Reversed Reflection in Water2
Mr.doob 7 năm trước cách đây
mục cha
commit
e0147fdb9e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/js/objects/Water2.js

+ 1 - 1
examples/js/objects/Water2.js

@@ -321,7 +321,7 @@ THREE.Water.WaterShader = {
 		'	vec3 coord = vCoord.xyz / vCoord.w;',
 		'	vec2 uv = coord.xy + coord.z * normal.xz * 0.05;',
 
-		'	vec4 reflectColor = texture2D( tReflectionMap, uv );',
+		'	vec4 reflectColor = texture2D( tReflectionMap, vec2( 1.0 - uv.x, uv.y ) );',
 		'	vec4 refractColor = texture2D( tRefractionMap, uv );',
 
 		// multiply water color with the mix of both textures