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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user