diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-14 09:45:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 09:45:38 +0200 |
commit | e651102b6f2d4aad48db37ee4017415db031f302 (patch) | |
tree | 99b1148d1853fa53ead8caec1beb71274f880cd5 /scene | |
parent | 0386054b4c3a26d2eead443650b50d7a2faaefaf (diff) | |
parent | 85f4d3327601d9c75b1d94d9e63d7c5af42ceaba (diff) |
Merge pull request #20860 from guilhermefelipecgs/fix_border_artifact
Fix border artifacts at the edge of deep parallax.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/material.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 875b72159a..dc29102492 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -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"; } |