mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1309 from Azaezel/alpha41/ICeeUuu
clean up surface property visualizer
This commit is contained in:
commit
2dbfc16cf9
3 changed files with 5 additions and 38 deletions
|
|
@ -1,31 +1,9 @@
|
||||||
singleton GFXStateBlockData( Viz_DefaultVisualizeState )
|
singleton GFXStateBlockData( Viz_DefaultVisualizeState )
|
||||||
{
|
{
|
||||||
/*alphaDefined = true;
|
blendDefined = false;
|
||||||
alphaTestEnable = true;
|
blendEnable = false;
|
||||||
alphaTestRef = 1;
|
|
||||||
alphaTestFunc = GFXCmpGreaterEqual;
|
|
||||||
|
|
||||||
// Do a one to one blend.
|
|
||||||
blendDefined = true;
|
|
||||||
blendEnable = true;
|
|
||||||
blendSrc = GFXBlendOne;
|
blendSrc = GFXBlendOne;
|
||||||
blendDest = GFXBlendOne;
|
blendDest = GFXBlendZero;
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
zDefined = true;
|
zDefined = true;
|
||||||
zEnable = false;
|
zEnable = false;
|
||||||
|
|
@ -36,7 +14,6 @@ singleton GFXStateBlockData( Viz_DefaultVisualizeState )
|
||||||
samplerStates[1] = SamplerClampPoint;
|
samplerStates[1] = SamplerClampPoint;
|
||||||
samplerStates[2] = SamplerClampPoint;
|
samplerStates[2] = SamplerClampPoint;
|
||||||
samplerStates[3] = SamplerClampLinear; // depthviz
|
samplerStates[3] = SamplerClampLinear; // depthviz
|
||||||
samplerStates[4] = SamplerClampLinear; // depthviz
|
|
||||||
};
|
};
|
||||||
|
|
||||||
singleton shaderData( Viz_TexelDensity )
|
singleton shaderData( Viz_TexelDensity )
|
||||||
|
|
@ -92,7 +69,6 @@ singleton shaderData( Viz_SurfaceProperties )
|
||||||
samplerNames[2] = "$matInfoBuffer";
|
samplerNames[2] = "$matInfoBuffer";
|
||||||
samplerNames[3] = "$ssaoMaskTex";
|
samplerNames[3] = "$ssaoMaskTex";
|
||||||
samplerNames[4] = "$backbufferTex";
|
samplerNames[4] = "$backbufferTex";
|
||||||
samplerNames[5] = "$glowBuffer";
|
|
||||||
|
|
||||||
pixVersion = 2.0;
|
pixVersion = 2.0;
|
||||||
};
|
};
|
||||||
|
|
@ -106,7 +82,6 @@ singleton PostEffect( Viz_SurfacePropertiesPFX )
|
||||||
texture[2] = "#matinfo";
|
texture[2] = "#matinfo";
|
||||||
texture[3] = "#ssaoMask";
|
texture[3] = "#ssaoMask";
|
||||||
texture[4] = "$backBuffer";
|
texture[4] = "$backBuffer";
|
||||||
texture[5] = "#glowbuffer";
|
|
||||||
|
|
||||||
target = "$backBuffer";
|
target = "$backBuffer";
|
||||||
renderPriority = 9999;
|
renderPriority = 9999;
|
||||||
|
|
@ -186,8 +161,6 @@ function toggleSurfacePropertiesViz( %mode )
|
||||||
$Viz_SurfacePropertiesModeVar = "12";
|
$Viz_SurfacePropertiesModeVar = "12";
|
||||||
case "Backbuffer":
|
case "Backbuffer":
|
||||||
$Viz_SurfacePropertiesModeVar = "13";
|
$Viz_SurfacePropertiesModeVar = "13";
|
||||||
case "Glow":
|
|
||||||
$Viz_SurfacePropertiesModeVar = "14";
|
|
||||||
default:
|
default:
|
||||||
$Viz_SurfacePropertiesModeVar = "-1";
|
$Viz_SurfacePropertiesModeVar = "-1";
|
||||||
}
|
}
|
||||||
|
|
@ -269,8 +242,8 @@ singleton PostEffect( Viz_ColorBlindnessPFX )
|
||||||
{
|
{
|
||||||
isEnabled = false;
|
isEnabled = false;
|
||||||
allowReflectPass = false;
|
allowReflectPass = false;
|
||||||
renderTime = "PFXAfterBin";
|
renderTime = "PFXBeforeBin";
|
||||||
renderBin = "GlowBin";
|
renderBin = "EditorBin";
|
||||||
|
|
||||||
shader = Viz_ColorBlindness;
|
shader = Viz_ColorBlindness;
|
||||||
stateBlock = PFX_DefaultStateBlock;
|
stateBlock = PFX_DefaultStateBlock;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ uniform sampler2D colorBuffer;
|
||||||
uniform sampler2D matInfoBuffer;
|
uniform sampler2D matInfoBuffer;
|
||||||
uniform sampler2D ssaoMaskTex;
|
uniform sampler2D ssaoMaskTex;
|
||||||
uniform sampler2D backbufferTex;
|
uniform sampler2D backbufferTex;
|
||||||
uniform sampler2D glowBuffer;
|
|
||||||
|
|
||||||
uniform float mode;
|
uniform float mode;
|
||||||
uniform vec3 eyePosWorld;
|
uniform vec3 eyePosWorld;
|
||||||
|
|
@ -78,6 +77,4 @@ void main()
|
||||||
OUT_col = vec4(texture( ssaoMaskTex, IN_uv0 ).rgb, 1.0);
|
OUT_col = vec4(texture( ssaoMaskTex, IN_uv0 ).rgb, 1.0);
|
||||||
else if(mode == 13)
|
else if(mode == 13)
|
||||||
OUT_col = vec4(texture( backbufferTex, IN_uv0 ).rgb, 1.0);
|
OUT_col = vec4(texture( backbufferTex, IN_uv0 ).rgb, 1.0);
|
||||||
else if(mode == 14)
|
|
||||||
OUT_col = vec4(texture( glowBuffer, IN_uv0 ).rgb, 1.0);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ TORQUE_UNIFORM_SAMPLER2D(colorBuffer, 1);
|
||||||
TORQUE_UNIFORM_SAMPLER2D(matInfoBuffer, 2);
|
TORQUE_UNIFORM_SAMPLER2D(matInfoBuffer, 2);
|
||||||
TORQUE_UNIFORM_SAMPLER2D(ssaoMaskTex, 3);
|
TORQUE_UNIFORM_SAMPLER2D(ssaoMaskTex, 3);
|
||||||
TORQUE_UNIFORM_SAMPLER2D(backbufferTex, 4);
|
TORQUE_UNIFORM_SAMPLER2D(backbufferTex, 4);
|
||||||
TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 5);
|
|
||||||
|
|
||||||
uniform float mode;
|
uniform float mode;
|
||||||
uniform float4x4 cameraToWorld;
|
uniform float4x4 cameraToWorld;
|
||||||
|
|
@ -76,8 +75,6 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
|
||||||
float4(TORQUE_TEX2D( ssaoMaskTex, IN.uv0 ).rgb, 1.0);
|
float4(TORQUE_TEX2D( ssaoMaskTex, IN.uv0 ).rgb, 1.0);
|
||||||
else if(mode == 13)
|
else if(mode == 13)
|
||||||
float4(TORQUE_TEX2D( backbufferTex, IN.uv0 ).rgb, 1.0);
|
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);
|
return float4(0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue