Implement screen space cone tracing (SSCT)
This is a technique from Naughty Dog used in TLOU2, where we compute the "ambient" shadowing of a dominant light in screen-space. This is currently integrated to the SSAO pass.
This commit is contained in:
committed by
Mathias Agopian
parent
0f2993aec7
commit
bfd1de809a
@@ -615,6 +615,20 @@ static void gui(filament::Engine* engine, filament::View*) {
|
||||
ImGui::SliderInt("Quality", &quality, 0, 3);
|
||||
ImGui::SliderInt("Low Pass", &lowpass, 0, 2);
|
||||
ImGui::Checkbox("High quality upsampling", &upsampling);
|
||||
if (ImGui::CollapsingHeader("Dominant Light Shadows")) {
|
||||
int sampleCount = params.ssaoOptions.ssct.sampleCount;
|
||||
ImGui::Checkbox("Enabled##dls", ¶ms.ssaoOptions.ssct.enabled);
|
||||
ImGui::SliderFloat("Cone angle", ¶ms.ssaoOptions.ssct.lightConeRad, 0.0f, (float)M_PI_2);
|
||||
ImGui::SliderFloat("Start dist", ¶ms.ssaoOptions.ssct.startTraceDistance, 0.0f, 1.0f);
|
||||
ImGui::SliderFloat("Contact dist max", ¶ms.ssaoOptions.ssct.contactDistanceMax, 0.0f, 100.0f);
|
||||
ImGui::SliderFloat("Intensity##dls", ¶ms.ssaoOptions.ssct.intensity, 0.0f, 10.0f);
|
||||
ImGui::SliderFloat("Depth bias", ¶ms.ssaoOptions.ssct.depthBias, 0.0f, 1.0f);
|
||||
ImGui::SliderFloat("Depth slope bias", ¶ms.ssaoOptions.ssct.depthSlopeBias, 0.0f, 1.0f);
|
||||
ImGui::SliderFloat("Scale", ¶ms.ssaoOptions.ssct.scale, 0.0f, 10.0f);
|
||||
ImGui::SliderInt("Sample Count", &sampleCount, 1, 32);
|
||||
ImGuiExt::DirectionWidget("Direction##dls", params.ssaoOptions.ssct.lightDirection.v);
|
||||
params.ssaoOptions.ssct.sampleCount = sampleCount;
|
||||
}
|
||||
params.ssaoOptions.upsampling = upsampling ? View::QualityLevel::HIGH : View::QualityLevel::LOW;
|
||||
params.ssaoOptions.quality = (View::QualityLevel)quality;
|
||||
params.ssaoOptions.lowPassFilter = (View::QualityLevel)lowpass;
|
||||
|
||||
Reference in New Issue
Block a user