Skip to main content

fragment_prelude

Function fragment_prelude 

Source
pub fn fragment_prelude(group: u32) -> String
Expand description

The whole fixed half of a converted fragment module: the uniform block, the binding declarations at group, and MilkDrop’s own prelude helpers (lum, GetPixel, GetBlur1..3) under collision-proof rlx_ names.

Helpers are declared whether or not the preset calls them — an uncalled function does not put its bindings in the entry point’s resource set, so a shader that never blurs needs no blur textures in its layout.