Browse Source

pbrdebug working with prepass

Benjamin Guignabert 5 years ago
parent
commit
0c24742263
1 changed files with 2 additions and 1 deletions
  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;
 }