flip sphereical projection back on as an option to support the second class

This commit is contained in:
Azaezel 2019-02-15 09:18:03 -06:00
parent 5d48af3729
commit 56bd17a8e9

View file

@ -115,22 +115,22 @@ float4 main( PFXVertToPix IN ) : SV_TARGET
for(i=0; i < numProbes; i++) for(i=0; i < numProbes; i++)
{ {
float3 probeWS = inProbePosArray[i].xyz; float3 probeWS = inProbePosArray[i].xyz;
float3 L = probeWS - surface.P; float3 L = probeWS - surface.P;
/*if(useSphereMode[i]) 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];
blendVal[i] = max(0,blendVal[i]); blendVal[i] = max(0,blendVal[i]);
} }
else else
{*/ {
blendVal[i] = defineBoxSpaceInfluence(surface, i); blendVal[i] = defineBoxSpaceInfluence(surface, i);
blendVal[i] = max(0,blendVal[i]); blendVal[i] = max(0,blendVal[i]);
//} }
blendSum += blendVal[i]; blendSum += blendVal[i];
invBlendSum +=(1.0f - blendVal[i]); invBlendSum +=(1.0f - blendVal[i]);
} }
// Weight0 = normalized NDF, inverted to have 1 at center, 0 at boundary. // Weight0 = normalized NDF, inverted to have 1 at center, 0 at boundary.