Skip to content

Commit a4462f9

Browse files
committed
Merge branch 'fix-clearcoat-gloss'
2 parents 315565e + 55a82a3 commit a4462f9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scene/resources/material.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4047,6 +4047,12 @@ bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value)
40474047
set_flag(FLAG_INVERT_HEIGHTMAP, true);
40484048
}
40494049
return true;
4050+
} else if (p_name == "clearcoat_gloss") {
4051+
float gloss = p_value;
4052+
if (gloss > 0.0f) {
4053+
set_clearcoat_roughness(1.0f - gloss);
4054+
}
4055+
return true;
40504056
} else {
40514057
static const Pair<const char *, const char *> remaps[] = {
40524058
{ "flags_use_shadow_to_opacity", "shadow_to_opacity" },

0 commit comments

Comments
 (0)