Switch specular AA to Tokuyoshi and Kaplanyan (#1218)

This replaces the previous "curvature to roughness" method. Both are related
and rely on the screen space variance of geometric normals but this new
solution offers more control (the screen space variance and the clamping
threshold can be controlled).
This commit is contained in:
Romain Guy
2019-05-23 12:56:26 -07:00
committed by GitHub
parent af559a1344
commit 0a5c068cb6
47 changed files with 649 additions and 412 deletions

View File

@@ -260,9 +260,9 @@ static void setup(Engine* engine, View*, Scene* scene) {
)SHADER";
} else {
shader += R"SHADER(
material.baseColor.rgb = float3(0.6, 0.6, 0.6);
material.baseColor.rgb = float3(0.3, 0.0, 0.0);
material.metallic = 0.0;
material.roughness = 0.7;
material.roughness = 0.0;
)SHADER";
}
@@ -276,6 +276,7 @@ static void setup(Engine* engine, View*, Scene* scene) {
MaterialBuilder builder = MaterialBuilder()
.name("DefaultMaterial")
.material(shader.c_str())
.specularAntiAliasing(true)
.shading(Shading::LIT);
if (hasNormalMap) {