瀏覽代碼

Renderer: Some indirect fixes

Panagiotis Christopoulos Charitos 8 年之前
父節點
當前提交
f0c2288a1c
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      shaders/Irradiance.frag.glsl
  2. 1 1
      shaders/Light.frag.glsl

+ 1 - 1
shaders/Irradiance.frag.glsl

@@ -55,5 +55,5 @@ void main()
 		}
 	}
 
-	out_color = (outCol * 4.0 * PI) / weight;
+	out_color = outCol / weight;
 }

+ 1 - 1
shaders/Light.frag.glsl

@@ -86,7 +86,7 @@ void main()
 	float lambert = nol;
 
 #if defined(POINT_LIGHT)
-	out_color = (specC + diffC) * (att * lambert);
+	out_color = (specC + diffC) * (att * max(lambert, gbuffer.subsurface));
 #else
 	float spot =
 		computeSpotFactor(l, u_light.diffuseColorOuterCos.w, u_light.specularColorInnerCos.w, u_light.lightDirPad1.xyz);