diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-23 08:27:34 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-23 08:27:48 -0300 |
commit | fbabef6da388c60a982601ff205e6e9a09b1eada (patch) | |
tree | 5bebeda681a8729abced50fa163348149473b3c7 /scene | |
parent | 210ebb5cdbecd326c1b0edd35cfda94e3a74c6d9 (diff) |
Fixes to rim parameter in shader
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/material.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index ae858e862c..c6b434af44 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -737,7 +737,7 @@ void SpatialMaterial::_update_shader() { code += "\tALBEDO *= 1.0 - ref_amount;\n"; code += "\tALPHA = 1.0;\n"; - } else if (features[FEATURE_TRANSPARENT] || features[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) { + } else if (features[FEATURE_TRANSPARENT] || flags[FLAG_USE_ALPHA_SCISSOR] || distance_fade_enabled || proximity_fade_enabled) { code += "\tALPHA = albedo.a * albedo_tex.a;\n"; } @@ -857,10 +857,10 @@ void SpatialMaterial::_update_shader() { code += "\tvec3 detail_norm = mix(NORMALMAP,detail_norm_tex.rgb,detail_tex.a);\n"; code += "\tNORMALMAP = mix(NORMALMAP,detail_norm,detail_mask_tex.r);\n"; code += "\tALBEDO.rgb = mix(ALBEDO.rgb,detail,detail_mask_tex.r);\n"; + } - if (flags[FLAG_USE_ALPHA_SCISSOR]) { - code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n"; - } + if (flags[FLAG_USE_ALPHA_SCISSOR]) { + code += "\tALPHA_SCISSOR=alpha_scissor_threshold;\n"; } code += "}\n"; |