ShiroSmith 6 anni fa
parent
commit
c8072ca9bb
2 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 2 0
      h3d/scene/pbr/Renderer.hx
  2. 2 1
      h3d/shader/pbr/ToneMapping.hx

+ 2 - 0
h3d/scene/pbr/Renderer.hx

@@ -267,6 +267,7 @@ class Renderer extends h3d.scene.Renderer {
 		mainDraw();
 
 		// Depth Copy
+		mark("DepthCopy");
 		var depth = allocTarget("depth",false,1.,R32F);
 		var depthMap = ctx.getGlobal("depthMap");
 		depthCopy.shader.depthTexture = depthMap.texture;
@@ -275,6 +276,7 @@ class Renderer extends h3d.scene.Renderer {
 		depthCopy.render();
 		ctx.setGlobal("depthMap",{ texture : depth, channel : hxsl.Channel.R });
 
+		mark("Decal");
 		setTargets([albedo,normal,pbr]);
 		renderPass(decalsOutput, get("decal"));
 

+ 2 - 1
h3d/shader/pbr/ToneMapping.hx

@@ -45,7 +45,8 @@ class ToneMapping extends ScreenShader {
 			}
 
 			// gamma correct
-			if( !isSRBG ) color.rgb = color.rgb.sqrt();
+			if( !isSRBG )
+				color.rgb = color.rgb.sqrt();
 
 			if( hasColorGrading ) {
 				var uv = min(color.rgb, vec3(1,1,1));