Consider setting texture sampler sources to Shared:Wrap #490
Labels
enhancement
New feature or request
performance
Improvements to performance, including reductions in memory usage
In the CesiumGlTFFunction and CesiumRasterOverlay material functions, we use a lot of Texture Sample nodes, which means that we are by default at 10/16 texture samplers for the M_CesiumOverlay material and 12/16 for M_CesiumOverlayWater. This definitely limits future materials that we or users may need to create.
If we set the Sampler Source on each Texture Sample to Shared:Wrap, we can significantly reduce the texture samplers to 3/16 for the overlay material and 4/16 for the water material.
From my preliminary testing, it hasn't changed the appearance of tilesets at all. In addition, it doesn't look like there are really known issues that arise from doing this. One user in this thread posted that Shared: Wrap doesn't work with Metal, which may cause trouble for mac builds. We should definitely test this out, and figure out if there are any other drawbacks of changing the Sampler Source to this. If not, this would be a helpful change.
If you want to test this out, I've set the materials to use Shared: Wrap in the reduce-tex-samples branch.
The text was updated successfully, but these errors were encountered: