浏览代码

Remove emissive for decal pbr

ShiroSmith 6 年之前
父节点
当前提交
7cdd28c5c8
共有 2 个文件被更改,包括 2 次插入10 次删除
  1. 2 3
      h3d/scene/pbr/Renderer.hx
  2. 0 7
      h3d/shader/pbr/VolumeDecal.hx

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

@@ -94,8 +94,7 @@ class Renderer extends h3d.scene.Renderer {
 	var decalsOutput = new h3d.pass.Output("decals",[
 		Vec4([Swiz(Value("output.color"),[X,Y,Z]), Value("output.albedoStrength",1)]),
 		Vec4([Value("output.normal",3), Value("output.normalStrength",1)]),
-		Vec4([Value("output.metalness"), Value("output.roughness"), Value("output.occlusion"), Value("output.pbrStrength")]),
-		Vec4([Value("output.emissive"),Value("output.depth"), Const(0), Const(1)])
+		Vec4([Value("output.metalness"), Value("output.roughness"), Value("output.occlusion"), Value("output.pbrStrength")])
 	]);
 
 
@@ -229,7 +228,7 @@ class Renderer extends h3d.scene.Renderer {
 		depthCopy.render();
 		ctx.setGlobal("depthMap",{ texture : depth, channel : hxsl.Channel.R });
 
-		setTargets([albedo,normal,pbr,other]);
+		setTargets([albedo,normal,pbr]);
 		decalsOutput.draw(get("decal"));
 
 		setTarget(albedo);

+ 0 - 7
h3d/shader/pbr/VolumeDecal.hx

@@ -110,12 +110,9 @@ class DecalPBR extends hxsl.Shader {
 			metalness : Float,
 			roughness : Float,
 			occlusion : Float,
-			emissive : Float,
 			albedoStrength : Float,
 			normalStrength : Float,
 			pbrStrength : Float,
-			emissiveStrength : Float,
-			//depth : Float,
 		};
 
 		@const var CENTERED : Bool;
@@ -138,7 +135,6 @@ class DecalPBR extends hxsl.Shader {
 		@param var fadePower : Float;
 		@param var fadeStart : Float;
 		@param var fadeEnd : Float;
-		@param var emissive : Float;
 
 		@param var albedoTexture : Sampler2D;
 		@param var normalTexture : Sampler2D;
@@ -235,12 +231,9 @@ class DecalPBR extends hxsl.Shader {
 			output.metalness = prbValues.r;
 			output.roughness = prbValues.g;
 			output.occlusion = prbValues.b;
-			output.emissive = emissive * alpha;
 			output.albedoStrength = strength.r * fadeFactor;
 			output.normalStrength = strength.g * fadeFactor;
 			output.pbrStrength = strength.b * fadeFactor;
-			output.emissiveStrength = 0;
-			//output.depth = 0; // Dont draw depth again
 		}
 	};