Skip to main content

bundled_shader_cache_dir

Function bundled_shader_cache_dir 

Source
pub fn bundled_shader_cache_dir() -> Option<PathBuf>
Expand description

Directory holding shader binaries shipped inside a bundle, read-only. cn export warms this so a player’s first launch does not pay the compile; because the artifacts are backend IR (DXBC / SPIR-V) rather than machine code, one warmed at package time is valid on any machine.

Equal to shader_cache_dir whenever the content root is writable (the portable-folder case). The two diverge only for a read-only install, which redirects writable state to a per-user directory: the bundled artifacts then stay readable here while new ones land in the writable dir.