Added AdvanceScope;
Added energy conservation to diffuse lighting; Clean up shader properties;
This commit is contained in:
@@ -32,7 +32,7 @@ void UTS_OtherLights(LightLoopContext lightLoopContext, FragInputs input, UTSLig
|
||||
#endif
|
||||
|
||||
float3 lightDirection = utsLightData.lightDirection;
|
||||
float3 additionalLightColor = utsLightData.lightColor * _Light_Intensity_Multiplier;
|
||||
float3 additionalLightColor = utsLightData.lightColor * _LightIntensityMultiplier;
|
||||
|
||||
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData);
|
||||
|
||||
@@ -70,7 +70,7 @@ void UTS_OtherLights(LightLoopContext lightLoopContext, FragInputs input, UTSLig
|
||||
}
|
||||
|
||||
float pureIntensity = max(0.001, (0.299 * additionalLightColor.r + 0.587 * additionalLightColor.g + 0.114 * additionalLightColor.b));
|
||||
float3 lightColor = max(float3(0.0, 0.0, 0.0), lerp(addPassLightColor, lerp(float3(0.0, 0.0, 0.0), min(addPassLightColor, addPassLightColor / pureIntensity), notDirectional), _Is_Filter_LightColor));
|
||||
float3 lightColor = max(float3(0.0, 0.0, 0.0), lerp(addPassLightColor, lerp(float3(0.0, 0.0, 0.0), min(addPassLightColor, addPassLightColor / pureIntensity), notDirectional), _ClampLightColor));
|
||||
float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here.
|
||||
//v.2.0.5:
|
||||
_1st_ShadeColor_Step = saturate(_1st_ShadeColor_Step + _StepOffset);
|
||||
@@ -255,4 +255,4 @@ void UTS_OtherLights(LightLoopContext lightLoopContext, FragInputs input, UTSLig
|
||||
utsAggregateLighting.directDiffuse += diffuseTerm * utsLightData.diffuseDimmer;
|
||||
utsAggregateLighting.directSpecular += specularTerm * utsLightData.specularDimmer;
|
||||
#endif // _SDFShadow
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user