Skip to content

CF_Sampler

Category: graphics
GitHub: cute_graphics.h


A standalone sampler: how a texture is read, decoupled from the texture itself.

Remarks

Every texture bakes one sampler from its CF_TextureParams -- fine until one texture needs two read styles (a depth map read raw for a blocker search AND through hardware compare for PCF; one image sampled NEAREST in one pass and LINEAR in another). A standalone sampler overrides the baked one at binding time via cf_material_set_texture_vs_sampler / _fs_sampler.

CF_SamplerParams
cf_make_sampler
cf_destroy_sampler
cf_material_set_texture_fs_sampler