The thing is, we already use 3D textures, and some of them use CLAMP_TO_BORDER
(ex: Volumes Attributes) and some use EXTEND
(ex: EEVEE Volume temp textures). If the choice to omit wrapping_z
is to save a dimension, it should be documented. Maybe rename wrapping_y
to wrapping_yz
in this case and make Z follow Y extend mode.
The patch is fine. Just a note about codestyle.
Style: Avoid nesting as much as possible.
Wrap is a bit misleading terminology here. So maybe GPUSamplerExtendMode
?
It seems you did not took into account the clamp to border color case in all of these.
I still have to review all the usages. But the overall approach looks good.
The thing is, filtering is too generic of a name. I don't know if this will set the whole enum
value or just one option if I see set_filtering(GPU_SAMPLER_FILTERING_MIPMAP)
. And I don't…
These should be documented. For example, I'm not sure what an internal_sampler
is right away.
I think you can omit the actual value set after the first one. Keep = 0
but remove = 1
, = 2
, ...
I think it is a good opportunity to remove the e
prefix which is not part of the code-style anymore.