Change specularAmbientOcclusion from boolean to enum (#2352)

The user can now choose amongst 3 specular AO methods:
- None, specAO is off
- Simple, specAO is inferred from roughness and diffuse AO
- Bent normals, specAO is computed accurately from cone intersections

The last method is more expensive but produces the best results.

This change also fixes a few issues:
- Rename materialRefraction() and materialRefractionType() for
  consistency
- Fixes user time in shaders
This commit is contained in:
Romain Guy
2020-04-07 09:19:48 -07:00
committed by GitHub
parent 887f8e8a1c
commit bf0dc32ee3
18 changed files with 191 additions and 76 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ static void setup(Engine* engine, View* view, Scene* scene) {
.name("DefaultMaterial")
.material(shader.c_str())
.multiBounceAmbientOcclusion(true)
.specularAmbientOcclusion(true)
.specularAmbientOcclusion(MaterialBuilder::SpecularAmbientOcclusion::BENT_NORMALS)
.shading(Shading::LIT);
if (hasUV) {