-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add texel anti-aliasing #16795
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
base: master
Are you sure you want to change the base?
The head ref may contain hidden characters: "Robert');\u00A0DROP\u00A0TABLE\u00A0Students;--"
Add texel anti-aliasing #16795
Changes from 1 commit
1580ba3
8111ccb
b0102aa
09aae09
323d33e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -367,6 +367,11 @@ class NodeShaderConstantSetter : public IShaderConstantSetter | |
|
|
||
| constants["ENABLE_WAVING_LEAVES"] = g_settings->getBool("enable_waving_leaves") ? 1 : 0; | ||
| constants["ENABLE_WAVING_PLANTS"] = g_settings->getBool("enable_waving_plants") ? 1 : 0; | ||
|
|
||
| if (g_settings->getBool("texel_antialiasing") | ||
| && (g_settings->getBool("trilinear_filter") | ||
| || g_settings->getBool("bilinear_filter"))) | ||
| constants["TEXEL_ANTIALIASING"] = 1; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure this even shows up in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works for me when I test it, so I assume that it works in general.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I somehow forgot testing with objects. It appears to work with dropped items, but not for mtg boat or mtg cart. |
||
| } | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1499,8 +1499,8 @@ bool ImageSource::generateImagePart(std::string_view part_of_name, | |
| * see <https://github.com/luanti-org/luanti/issues/15604> and related | ||
| * linked discussions. | ||
| */ | ||
| const bool filter = m_setting_trilinear_filter || m_setting_bilinear_filter; | ||
| if (filter) { | ||
| if (!m_setting_texel_antialiasing && | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please update the comment to explain how texel AA makes this redundant. |
||
| (m_setting_trilinear_filter || m_setting_bilinear_filter)) { | ||
| const f32 scaleto = rangelim(g_settings->getU16("texture_min_size"), | ||
| TEXTURE_FILTER_MIN_SIZE, 16384); | ||
|
|
||
|
|
@@ -1802,7 +1802,8 @@ ImageSource::ImageSource() : | |
| m_setting_mipmap{g_settings->getBool("mip_map")}, | ||
| m_setting_trilinear_filter{g_settings->getBool("trilinear_filter")}, | ||
| m_setting_bilinear_filter{g_settings->getBool("bilinear_filter")}, | ||
| m_setting_anisotropic_filter{g_settings->getBool("anisotropic_filter")} | ||
| m_setting_anisotropic_filter{g_settings->getBool("anisotropic_filter")}, | ||
| m_setting_texel_antialiasing{g_settings->getBool("texel_antialiasing")} | ||
| {} | ||
|
|
||
| video::IImage* ImageSource::generateImage(std::string_view name, | ||
|
|
||
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.
so won't this visibly change behavior for people who use bi/tri?
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.
yes
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.
then we shouldn't enable it by default