Skip to content

Commit

Permalink
Merge pull request #34008 from ricmzn/fix-viewport-texture-flags
Browse files Browse the repository at this point in the history
GLES3: Allow repeat flag in viewport textures
  • Loading branch information
akien-mga authored Apr 28, 2021
2 parents e9efc34 + ebf2759 commit 135fd8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gles3/rasterizer_storage_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,8 @@ void RasterizerStorageGLES3::texture_set_flags(RID p_texture, uint32_t p_flags)
Texture *texture = texture_owner.get(p_texture);
ERR_FAIL_COND(!texture);
if (texture->render_target) {

p_flags &= VS::TEXTURE_FLAG_FILTER; //can change only filter
// only allow filter and repeat flags for render target (ie. viewport) textures
p_flags &= (VS::TEXTURE_FLAG_FILTER | VS::TEXTURE_FLAG_REPEAT);
}

bool had_mipmaps = texture->flags & VS::TEXTURE_FLAG_MIPMAPS;
Expand Down

0 comments on commit 135fd8f

Please sign in to comment.