mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
blend, don't add skylight, and take shadowmask into account for compute4lights.
This commit is contained in:
parent
1ec9177557
commit
c5d1dfb7f8
2 changed files with 5 additions and 5 deletions
|
|
@ -278,9 +278,9 @@ float4 compute4Lights( Surface surface,
|
||||||
lighting *= getSpotAngleAtt(-surfaceToLight.L, inLightSpotDir[i].xyz, lightSpotParams[i].xy );
|
lighting *= getSpotAngleAtt(-surfaceToLight.L, inLightSpotDir[i].xyz, lightSpotParams[i].xy );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
finalLighting += lighting;
|
finalLighting += lighting;
|
||||||
}
|
}
|
||||||
|
finalLighting *= shadowMask.rgb;
|
||||||
|
|
||||||
return float4(finalLighting,1);
|
return float4(finalLighting,1);
|
||||||
}
|
}
|
||||||
|
|
@ -445,8 +445,8 @@ float4 computeForwardProbes(Surface surface,
|
||||||
|
|
||||||
if(skylightCubemapIdx != -1 && alpha >= 0.001)
|
if(skylightCubemapIdx != -1 && alpha >= 0.001)
|
||||||
{
|
{
|
||||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz * alpha;
|
irradiance = lerp(irradiance,TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz,alpha);
|
||||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz * alpha;
|
specular = lerp(specular,TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz,alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness);
|
float3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness);
|
||||||
|
|
|
||||||
|
|
@ -176,8 +176,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
||||||
|
|
||||||
if(skylightCubemapIdx != -1 && alpha >= 0.001)
|
if(skylightCubemapIdx != -1 && alpha >= 0.001)
|
||||||
{
|
{
|
||||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz * alpha;
|
irradiance = lerp(irradiance,TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz,alpha);
|
||||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz * alpha;
|
specular = lerp(specular,TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz,alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUGVIZ_SPECCUBEMAP == 1 && DEBUGVIZ_DIFFCUBEMAP == 0
|
#if DEBUGVIZ_SPECCUBEMAP == 1 && DEBUGVIZ_DIFFCUBEMAP == 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue