Page MenuHome

Fix T81206: Do not limit gl texture size in image editor
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Oct 9 2020, 9:42 AM.

Details

Summary

This patch will show textures in the image editor with the maximum
available resolution determined by the GPU Hardware/Driver.
Currently the size is limited by the user preference texture size limit.

An image user can set the IMA_SHOW_MAX_RESOLUTION flag to request
gpu textures in the max supported resolution. When this flag isn't
set the gpu texture is limited by the user preference setting.

When the gl resolution limit is disabled the GPU texture is always
created for the max supported resolution.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Oct 9 2020, 9:42 AM
Jeroen Bakker (jbakker) planned changes to this revision.Oct 9 2020, 5:12 PM
Jeroen Bakker (jbakker) retitled this revision from [WIP] Fix T81206: Do not limit gl texture size in image editor to Fix T81206: Do not limit gl texture size in image editor.Oct 20 2020, 12:13 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) retitled this revision from Fix T81206: Do not limit gl texture size in image editor to [WIP] Fix T81206: Do not limit gl texture size in image editor.
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
  • T81206: Fix issues that switching texture sizes didn't work
  • Don't refresh GPU textures when gl resolution limit is disabled
  • Code cleanup: the reversed logic is much cleaner
Jeroen Bakker (jbakker) retitled this revision from [WIP] Fix T81206: Do not limit gl texture size in image editor to Fix T81206: Do not limit gl texture size in image editor.Oct 20 2020, 12:48 PM

I think this might be a problem if the texture is actually used in as a texture in the viewport / render as they would not match the correct limit. Or does the different image user flag ensure different GPU textures?

For render result, we could use IMA_TYPE_R_RESULT and IMA_TYPE_COMPOSITE to bypass the limit check.

I think this might be a problem if the texture is actually used in as a texture in the viewport / render as they would not match the correct limit. Or does the different image user flag ensure different GPU textures?

When rendering in viewport + image editor it switches GPU textures; Basically it has the next paths that lead to a texture switch

Image editor, UV editor => Only use device max resolution as a limit
Workbench/EEVEE => Use device + user pref max resolution as a limit (this is both for final rendering and viewport rendering)
Texture paint (single texture) => Use device + user pref max resolution as a limit (this is both for final rendering and viewport rendering)

When a texture is requested that does not match the previous usage the texture could be switched. T81206 mentioned that texture paint could use full resolution, but that has the issue that a texture could be discarded before it is rendered. I am going to revert this part as it leads to artifacts

For render result, we could use IMA_TYPE_R_RESULT and IMA_TYPE_COMPOSITE to bypass the limit check.

That still leads to low res images in the texture editor, where users don't expect it. I agree with Brecht that the gl res limit should be a viewport setting and not effect the image/uv editor.

  • Texture paint Single texture mode should follow viewport resolution
This revision is now accepted and ready to land.Feb 1 2021, 3:55 PM

Rebased with latest