New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More options for min filter in game.project
->Graphics
->Default Texture Min Filter
#8528
Conversation
More info about the topic is available in this doc: https://docs.google.com/document/d/16nRtcVRQ1i4fgGz3vQl8kpTYxl6N0itqq1-1ey-5K-M/edit#heading=h.x9phv9n1w8iu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor changes look good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, have you tested this on vulkan?
No, but In vulkan we have this logic which is right: defold/engine/graphics/src/vulkan/graphics_vulkan.cpp Lines 235 to 269 in a2c8424
|
(.equalsIgnoreCase "nearest_mipmap_nearest" s) gl/nearest-mipmap-nearest | ||
(.equalsIgnoreCase "nearest_mipmap_linear" s) gl/nearest-mipmap-linear | ||
(.equalsIgnoreCase "linear_mipmap_nearest" s) gl/linear-mipmap-nearest | ||
(.equalsIgnoreCase "linear_mipmap_linear" s) gl/linear-mipmap-linear |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed that the same logic should be added for the editor. I added new filter types in filter parser, but now Editor should behave the same as runtime:
if mipmaps turned off for the atlas, non-mipmap filter should be picked autimatically.
I 99% sure that this one fixed as well now #4055 |
Now, the field
Default Texture Min Filter
ingame.project
->Graphics
has the same options as materials do.This is a breaking change for projects that use mipmaps on their textures and the OpenGL graphics backend.
Old behavior was:
linear
andnearest
asDefault Texture Min Filter
meantTEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
andTEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
respectively.Min Filter
was specified with mipmaps, it used theMag Filter
option instead.Current behavior:
linear
andnearest
asDefault Texture Min Filter
meanTEXTURE_FILTER_LINEAR
andTEXTURE_FILTER_NEAREST
respectively.Min Filter
is specified with mipmaps, it simply ignores the mipmaps part of the filter. For example, forTEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
, it will beTEXTURE_FILTER_LINEAR
, etc.Fix #8443
PR checklist
Example of a well written PR description:
### Technical changes
Technical changes:
Technical notes: