mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Merge pull request #862 from Azaezel/alpha401/metalCaptureFix
probe capture cleanups pt1
This commit is contained in:
commit
280fca2fbe
6 changed files with 6 additions and 6 deletions
|
|
@ -817,7 +817,7 @@ void ReflectionProbe::createEditorResources()
|
||||||
|
|
||||||
void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
||||||
{
|
{
|
||||||
if (!mEnabled || (!RenderProbeMgr::smRenderReflectionProbes && Con::getVariable("$Probes::Capturing", "0") == "0"))
|
if (!mEnabled || (!RenderProbeMgr::smRenderReflectionProbes && dStrcmp(Con::getVariable("$Probes::Capturing", "0"),"1")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Point3F distVec = getRenderPosition() - state->getCameraPosition();
|
Point3F distVec = getRenderPosition() - state->getCameraPosition();
|
||||||
|
|
|
||||||
|
|
@ -798,7 +798,7 @@ void RenderProbeMgr::render( SceneRenderState *state )
|
||||||
_setupPerFrameParameters(state);
|
_setupPerFrameParameters(state);
|
||||||
|
|
||||||
// Early out if nothing to draw.
|
// Early out if nothing to draw.
|
||||||
if ((!RenderProbeMgr::smRenderReflectionProbes && Con::getVariable("$Probes::Capturing", "0") == "0") || (!mHasSkylight && mProbeData.effectiveProbeCount == 0))
|
if ((!RenderProbeMgr::smRenderReflectionProbes && dStrcmp(Con::getVariable("$Probes::Capturing", "0"), "1")) || (!mHasSkylight && mProbeData.effectiveProbeCount == 0))
|
||||||
{
|
{
|
||||||
getProbeArrayEffect()->setSkip(true);
|
getProbeArrayEffect()->setSkip(true);
|
||||||
mActiveProbes.clear();
|
mActiveProbes.clear();
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,7 @@ vec4 computeForwardProbes(Surface surface,
|
||||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||||
horizon *= horizon;
|
horizon *= horizon;
|
||||||
#if CAPTURING == 1
|
#if CAPTURING == 1
|
||||||
return vec4(mix(surface.baseColor.rgb,(irradiance + specular* horizon) ,surface.metalness/2),0);
|
return vec4(mix((irradiance + specular* horizon),surface.baseColor.rgb,surface.metalness),0);
|
||||||
#else
|
#else
|
||||||
return vec4((irradiance + specular* horizon) , 0);//alpha writes disabled
|
return vec4((irradiance + specular* horizon) , 0);//alpha writes disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -506,7 +506,7 @@ float4 computeForwardProbes(Surface surface,
|
||||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||||
horizon *= horizon;
|
horizon *= horizon;
|
||||||
#if CAPTURING == 1
|
#if CAPTURING == 1
|
||||||
return float4(lerp(surface.baseColor.rgb,(irradiance + specular* horizon) ,surface.metalness/2),0);
|
return float4(lerp((irradiance + specular* horizon),surface.baseColor.rgb,surface.metalness),0);
|
||||||
#else
|
#else
|
||||||
return float4((irradiance + specular* horizon) , 0);//alpha writes disabled
|
return float4((irradiance + specular* horizon) , 0);//alpha writes disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ void main()
|
||||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||||
horizon *= horizon;
|
horizon *= horizon;
|
||||||
#if CAPTURING == 1
|
#if CAPTURING == 1
|
||||||
OUT_col = vec4(mix(surface.baseColor.rgb,(irradiance + specular* horizon) ,surface.metalness/2),0);
|
OUT_col = vec4(mix((irradiance + specular* horizon),surface.baseColor.rgb, surface.metalness),0);
|
||||||
#else
|
#else
|
||||||
OUT_col = vec4((irradiance + specular* horizon)*ambientColor, 0);//alpha writes disabled
|
OUT_col = vec4((irradiance + specular* horizon)*ambientColor, 0);//alpha writes disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
||||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||||
horizon *= horizon;
|
horizon *= horizon;
|
||||||
#if CAPTURING == 1
|
#if CAPTURING == 1
|
||||||
return float4(lerp(surface.baseColor.rgb,(irradiance + specular* horizon) ,surface.metalness/2),0);
|
return float4(lerp((irradiance + specular* horizon), surface.baseColor.rgb,surface.metalness),0);
|
||||||
#else
|
#else
|
||||||
return float4((irradiance + specular* horizon)*ambientColor, 0);//alpha writes disabled
|
return float4((irradiance + specular* horizon)*ambientColor, 0);//alpha writes disabled
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue