Skip to content

Consider setting texture sampler sources to Shared:Wrap #490

Open
@argallegos

Description

@argallegos

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.
image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceImprovements to performance, including reductions in memory usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions