mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
postfx updated to correct editor mangling. (still overriding skybox at minimum)
This commit is contained in:
parent
3f858f385e
commit
a1b5e454f6
2 changed files with 9 additions and 6 deletions
|
|
@ -327,6 +327,12 @@ singleton GFXStateBlockData( PFX_ReflectionProbeArrayStateBlock )
|
||||||
{
|
{
|
||||||
samplersDefined = true;
|
samplersDefined = true;
|
||||||
samplerStates[0] = SamplerClampLinear;
|
samplerStates[0] = SamplerClampLinear;
|
||||||
|
|
||||||
|
blendDefined = true;
|
||||||
|
blendEnable = true;
|
||||||
|
blendSrc = GFXBlendSrcAlpha;
|
||||||
|
blendDest = GFXBlendInvSrcAlpha;
|
||||||
|
blendOp = GFXBlendOpAdd;
|
||||||
};
|
};
|
||||||
|
|
||||||
singleton PostEffect( reflectionProbeArrayPostFX )
|
singleton PostEffect( reflectionProbeArrayPostFX )
|
||||||
|
|
|
||||||
|
|
@ -114,14 +114,11 @@ float4 main( PFXVertToPix IN ) : SV_TARGET
|
||||||
float invBlendSum = 0;
|
float invBlendSum = 0;
|
||||||
|
|
||||||
for(i=0; i < numProbes; i++)
|
for(i=0; i < numProbes; i++)
|
||||||
{
|
{
|
||||||
float3 probeWS = inProbePosArray[i].xyz;
|
|
||||||
float3 L = probeWS - surface.P;
|
|
||||||
|
|
||||||
if(useSphereMode[i].r)
|
if(useSphereMode[i].r)
|
||||||
{
|
{
|
||||||
float3 L = inProbePosArray[i].xyz - surface.P;
|
float3 L = inProbePosArray[i].xyz - surface.P;
|
||||||
blendVal[i] = 1.0-length(L)/radius[i];
|
blendVal[i] = 1.0-length(L)/radius[i].r;
|
||||||
blendVal[i] = max(0,blendVal[i]);
|
blendVal[i] = max(0,blendVal[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -179,7 +176,7 @@ float4 main( PFXVertToPix IN ) : SV_TARGET
|
||||||
}
|
}
|
||||||
//final diffuse color
|
//final diffuse color
|
||||||
float3 diffuse = kD * irradiance * surface.baseColor.rgb;
|
float3 diffuse = kD * irradiance * surface.baseColor.rgb;
|
||||||
float4 finalColor = float4(diffuse + specular * surface.ao, 1);
|
float4 finalColor = float4(diffuse + specular * surface.ao, blendSum);
|
||||||
|
|
||||||
return finalColor;
|
return finalColor;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue