|
@@ -61,8 +61,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|
|
//Set up our struct data
|
|
|
float contribution[MAX_PROBES];
|
|
|
|
|
|
- //if (alpha > 0)
|
|
|
- //{
|
|
|
+ if (alpha > 0)
|
|
|
+ {
|
|
|
//Process prooooobes
|
|
|
for (i = 0; i < numProbes; ++i)
|
|
|
{
|
|
@@ -113,11 +113,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|
|
{
|
|
|
blendFactor[i] *= invBlendSumWeighted;
|
|
|
contribution[i] *= blendFactor[i];
|
|
|
- alpha -= contribution[i];
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
- alpha -= blendSum;
|
|
|
|
|
|
#if DEBUGVIZ_ATTENUATION == 1
|
|
|
float contribAlpha = 1;
|
|
@@ -144,7 +141,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|
|
|
|
|
return float4(finalContribColor, 1);
|
|
|
#endif
|
|
|
- //}
|
|
|
+ }
|
|
|
#endif
|
|
|
|
|
|
float3 irradiance = float3(0, 0, 0);
|
|
@@ -158,11 +155,10 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|
|
#endif
|
|
|
|
|
|
#if SKYLIGHT_ONLY == 0
|
|
|
- alpha = 1;
|
|
|
for (i = 0; i < numProbes; ++i)
|
|
|
{
|
|
|
float contrib = contribution[i];
|
|
|
- if (contrib != 0)
|
|
|
+ if (contrib > 0.0f)
|
|
|
{
|
|
|
int cubemapIdx = probeConfigData[i].a;
|
|
|
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz);
|