瀏覽代碼

pbrdebug working with prepass

Benjamin Guignabert 5 年之前
父節點
當前提交
0c24742263
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Shaders/ShadersInclude/pbrDebug.fx

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

@@ -160,7 +160,8 @@ if (vClipSpacePosition.x / vClipSpacePosition.w >= vDebugMode.x) {
 
     gl_FragColor.a = 1.0;
     #ifdef PREPASS
-        gl_FragData[0] = gl_FragColor;
+        gl_FragData[0] = toLinearSpace(gl_FragColor); // linear to cancel gamma transform in prepass
+        gl_FragData[1] = vec4(0., 0., 0., 0.); // tag as no SSS
     #endif
     return;
 }