diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-12-12 14:40:21 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-12-27 11:21:24 +0200 |
commit | c4ed0d6acfc2cb444a5260cbd509a427208f7ac5 (patch) | |
tree | 6ceba81778153e8a28f0fa4ef918c2498cb40b51 /Studio/Content/Material Library/carpaint_color_peel_2_layer.shader | |
parent | 71190e5a059eba4c911abcfdd599c2a98d674ed0 (diff) |
Optimize and cleanup shaders
Change-Id: Ia27680e20f73ffe645d5a336fad7024e67a8389b
Reviewed-by: Janne Kangas <janne.kangas@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'Studio/Content/Material Library/carpaint_color_peel_2_layer.shader')
-rw-r--r-- | Studio/Content/Material Library/carpaint_color_peel_2_layer.shader | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Studio/Content/Material Library/carpaint_color_peel_2_layer.shader b/Studio/Content/Material Library/carpaint_color_peel_2_layer.shader index c435306..7bc5818 100644 --- a/Studio/Content/Material Library/carpaint_color_peel_2_layer.shader +++ b/Studio/Content/Material Library/carpaint_color_peel_2_layer.shader @@ -122,7 +122,7 @@ void computeFrontLayerColor( in vec3 normal, in vec3 lightDir, in vec3 viewDir, layers[1].layer += tmpShadowTerm * microfacetBSDF( layers[1].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, flake_roughness, flake_roughness, scatter_reflect ); - layers[2].base += tmpShadowTerm * diffuseReflectionBSDF( normal, lightDir, viewDir, lightDiffuse, 0.000000 ); + layers[2].base += tmpShadowTerm * diffuseReflectionBSDF( normal, lightDir, lightDiffuse ); layers[2].layer += tmpShadowTerm * microfacetBSDF( layers[2].tanFrame, lightDir, viewDir, lightSpecular, materialIOR, 0.300000, 0.300000, scatter_reflect ); #endif @@ -152,12 +152,12 @@ void computeFrontLayerEnvironment( in vec3 normal, in vec3 viewDir, float aoFact layers[2].layer += tmpShadowTerm * microfacetSampledBSDF( layers[2].tanFrame, viewDir, 0.300000, 0.300000, scatter_reflect ); #else - layers[0].layer += tmpShadowTerm * sampleGlossyAniso( layers[0].tanFrame, viewDir, coat_roughness, coat_roughness ); + layers[0].layer += tmpShadowTerm * sampleGlossy( layers[0].tanFrame, viewDir, coat_roughness ); - layers[1].layer += tmpShadowTerm * sampleGlossyAniso( layers[1].tanFrame, viewDir, flake_roughness, flake_roughness ); + layers[1].layer += tmpShadowTerm * sampleGlossy( layers[1].tanFrame, viewDir, flake_roughness ); layers[2].base += tmpShadowTerm * sampleDiffuse( layers[2].tanFrame ) * aoFactor; - layers[2].layer += tmpShadowTerm * sampleGlossyAniso( layers[2].tanFrame, viewDir, 0.300000, 0.300000 ); + layers[2].layer += tmpShadowTerm * sampleGlossy( layers[2].tanFrame, viewDir, 0.300000 ); #endif } |