I’m making a custom ton shading model I’m making a custom ton shading model
I found a problem while making a shadow
Skylight doesn’t work on the shadows of objects with Toon shading
I’ve made Skylight in DeferredLightingCommon.ush and it doesn’t seem to work.
// Affect SkyLightColor
float SkyLightAttenuation = saturate(SqrtThree / length(View.SkyLightColor.rgb));
MaskedLightColor += View.SkyLightColor.rgb * SkyLightAttenuation;
//
// Clamp to approx 0.0 … 1.0
MaskedLightColor *= saturate(SqrtThree / length(MaskedLightColor));
}
//
LightAccumulator_AddSplit(LightAccumulator, Lighting.Diffuse, Lighting.Specular, 0.0, MaskedLightColor, false);
//
LightAccumulator.EstimatedCost += 0.4f; // add the cost of the lighting computations (should sum up to 1 form one light)
//
return LightAccumulator;
“view.skylightcolor.rgb” doesn’t seem to work, is there any other way to make skylight work?