Merge pull request #20860 from guilhermefelipecgs/fix_border_artifact

Fix border artifacts at the edge of deep parallax.
This commit is contained in:
Rémi Verschelde 2018-08-14 09:45:38 +02:00 committed by GitHub
commit e651102b6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -694,6 +694,8 @@ void SpatialMaterial::_update_shader() {
}
code += "\t\tbase_uv=ofs;\n";
code += "\t\tif(base_uv.x > 1.0 || base_uv.y > 1.0 || base_uv.x < 0.0 || base_uv.y < 0.0)\n";
code += "\t\t\tdiscard;\n";
if (features[FEATURE_DETAIL] && detail_uv == DETAIL_UV_2) {
code += "\t\tbase_uv2-=ofs;\n";
}