Browse Source

pbrdebug working with prepass

Benjamin Guignabert 5 năm trước cách đây
mục cha
commit
0c24742263
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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;
 }