You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In all Hgi implementations, texture sampling is set to the maximum anisotropic filtering supported by the implementation, without any way to override it. See pxr/imaging/hgiGL/sampler.cpp, pxr/imaging/hgiGL/texture.cpp, pxr/imaging/hgiMetal/sampler.mm, pxr/imaging/hgiVulkan/sampler.cpp. This can be a significant performance issue, as it increases the texture memory bandwidth usage.
This is also done for every sampler, regardless of its usage. For example when enabling dome lighting, every sample on the pre-filtered light maps is done with anisotropic filtering, even if it's not a UV mapped texture (not applied to geometry). This can cause accuracy issues (because the sample is not on a fragment), but it's also completely wasted bandwidth.
Performance of anisotropic filtering is highly hardware dependent. Each vendor does it differently, and there are no standards (graphics API specs are very vague about how it should work). It's typically cheap on modern high performance hardware, but no so much on low spec hardware devices or software rasterizers.
A few simple changes could help fix most problems:
Expose maxAnisotropy in HgiSamplerDesc
Define an environment setting HGI_MAX_ANISOTROPY as an override for the implementation max anisotropy
Update current users of textures/samples to disable anisotropy when not needed (like dome lighting texture)
Steps to Reproduce
N/A
System Information (OS, Hardware)
N/A
Package Versions
N/A
Build Flags
N/A
The text was updated successfully, but these errors were encountered:
Description of Issue
In all Hgi implementations, texture sampling is set to the maximum anisotropic filtering supported by the implementation, without any way to override it. See
pxr/imaging/hgiGL/sampler.cpp
,pxr/imaging/hgiGL/texture.cpp
,pxr/imaging/hgiMetal/sampler.mm
,pxr/imaging/hgiVulkan/sampler.cpp
. This can be a significant performance issue, as it increases the texture memory bandwidth usage.This is also done for every sampler, regardless of its usage. For example when enabling dome lighting, every sample on the pre-filtered light maps is done with anisotropic filtering, even if it's not a UV mapped texture (not applied to geometry). This can cause accuracy issues (because the sample is not on a fragment), but it's also completely wasted bandwidth.
Performance of anisotropic filtering is highly hardware dependent. Each vendor does it differently, and there are no standards (graphics API specs are very vague about how it should work). It's typically cheap on modern high performance hardware, but no so much on low spec hardware devices or software rasterizers.
A few simple changes could help fix most problems:
maxAnisotropy
inHgiSamplerDesc
HGI_MAX_ANISOTROPY
as an override for the implementation max anisotropySteps to Reproduce
N/A
System Information (OS, Hardware)
N/A
Package Versions
N/A
Build Flags
N/A
The text was updated successfully, but these errors were encountered: