浏览代码

Change bump math to be less weird

Gary Hsu 8 年之前
父节点
当前提交
41831bf326
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/Shaders/ShadersInclude/bumpFragmentFunctions.fx

+ 1 - 2
src/Shaders/ShadersInclude/bumpFragmentFunctions.fx

@@ -41,8 +41,7 @@
 	vec3 perturbNormal(mat3 cotangentFrame, vec2 uv)
 	{
 		vec3 map = texture2D(bumpSampler, uv).xyz;
-
-		map = map * 255. / 127. - 128. / 127.;
+		map = map * 2.0 - 1.0;
 
 		#ifdef NORMALXYSCALE
 			map = normalize(map * vec3(vBumpInfos.y, vBumpInfos.y, 1.0));