Fixes texture corruption issues with ENABLE_TEXTURE_SAMPLING