Skip to content

Texture swizzling optimization for the BC4 shader #14

Description

@nanley

The BC4 shader takes in a uniform that acts as a channel selector. With a couple ternaries, it's used to determine which channel the shader should compress. Instead of relying on this uniform, it's possible to set a texture swizzle on the texture object to remap the desired channel for compression to red/x. Then, the ternaries can be dropped. For some drivers, this optimization can save a bit of math when executing the shader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions