Skip to content

Commit

Permalink
Merge pull request #1309 from Azaezel/alpha41/ICeeUuu
Browse files Browse the repository at this point in the history
clean up surface property visualizer
  • Loading branch information
Azaezel authored Aug 30, 2024
2 parents bb81b68 + 9da7823 commit 2dbfc16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,9 @@
singleton GFXStateBlockData( Viz_DefaultVisualizeState )
{
/*alphaDefined = true;
alphaTestEnable = true;
alphaTestRef = 1;
alphaTestFunc = GFXCmpGreaterEqual;

// Do a one to one blend.
blendDefined = true;
blendEnable = true;
blendDefined = false;
blendEnable = false;
blendSrc = GFXBlendOne;
blendDest = GFXBlendOne;

zDefined = true;
zEnable = false;
zWriteEnable = false;

samplersDefined = true;
samplerStates[0] = SamplerClampPoint;
samplerStates[1] = SamplerClampPoint;
samplerStates[2] = SamplerClampPoint;
samplerStates[3] = SamplerClampPoint;
samplerStates[4] = SamplerClampLinear;
samplerStates[5] = SamplerClampLinear;*/
blendDefined = true;
blendEnable = true;
blendSrc = GFXBlendSrcAlpha;
blendDest = GFXBlendInvSrcAlpha;
blendDest = GFXBlendZero;

zDefined = true;
zEnable = false;
Expand All @@ -36,7 +14,6 @@ singleton GFXStateBlockData( Viz_DefaultVisualizeState )
samplerStates[1] = SamplerClampPoint;
samplerStates[2] = SamplerClampPoint;
samplerStates[3] = SamplerClampLinear; // depthviz
samplerStates[4] = SamplerClampLinear; // depthviz
};

singleton shaderData( Viz_TexelDensity )
Expand Down Expand Up @@ -92,7 +69,6 @@ singleton shaderData( Viz_SurfaceProperties )
samplerNames[2] = "$matInfoBuffer";
samplerNames[3] = "$ssaoMaskTex";
samplerNames[4] = "$backbufferTex";
samplerNames[5] = "$glowBuffer";

pixVersion = 2.0;
};
Expand All @@ -106,7 +82,6 @@ singleton PostEffect( Viz_SurfacePropertiesPFX )
texture[2] = "#matinfo";
texture[3] = "#ssaoMask";
texture[4] = "$backBuffer";
texture[5] = "#glowbuffer";

target = "$backBuffer";
renderPriority = 9999;
Expand Down Expand Up @@ -186,8 +161,6 @@ function toggleSurfacePropertiesViz( %mode )
$Viz_SurfacePropertiesModeVar = "12";
case "Backbuffer":
$Viz_SurfacePropertiesModeVar = "13";
case "Glow":
$Viz_SurfacePropertiesModeVar = "14";
default:
$Viz_SurfacePropertiesModeVar = "-1";
}
Expand Down Expand Up @@ -269,8 +242,8 @@ singleton PostEffect( Viz_ColorBlindnessPFX )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
renderTime = "PFXBeforeBin";
renderBin = "EditorBin";

shader = Viz_ColorBlindness;
stateBlock = PFX_DefaultStateBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ uniform sampler2D colorBuffer;
uniform sampler2D matInfoBuffer;
uniform sampler2D ssaoMaskTex;
uniform sampler2D backbufferTex;
uniform sampler2D glowBuffer;

uniform float mode;
uniform vec3 eyePosWorld;
Expand Down Expand Up @@ -78,6 +77,4 @@ void main()
OUT_col = vec4(texture( ssaoMaskTex, IN_uv0 ).rgb, 1.0);
else if(mode == 13)
OUT_col = vec4(texture( backbufferTex, IN_uv0 ).rgb, 1.0);
else if(mode == 14)
OUT_col = vec4(texture( glowBuffer, IN_uv0 ).rgb, 1.0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ TORQUE_UNIFORM_SAMPLER2D(colorBuffer, 1);
TORQUE_UNIFORM_SAMPLER2D(matInfoBuffer, 2);
TORQUE_UNIFORM_SAMPLER2D(ssaoMaskTex, 3);
TORQUE_UNIFORM_SAMPLER2D(backbufferTex, 4);
TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 5);

uniform float mode;
uniform float4x4 cameraToWorld;
Expand Down Expand Up @@ -76,8 +75,6 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
float4(TORQUE_TEX2D( ssaoMaskTex, IN.uv0 ).rgb, 1.0);
else if(mode == 13)
float4(TORQUE_TEX2D( backbufferTex, IN.uv0 ).rgb, 1.0);
else if(mode == 14)
float4(TORQUE_TEX2D( glowBuffer, IN.uv0 ).rgb, 1.0);

return float4(0,0,0,1);
}

0 comments on commit 2dbfc16

Please sign in to comment.