Skip to main content

Module shaders

Module shaders 

Source
Expand description

The single-source .slang engine shaders, embedded once for every consumer.

Both halves of the toolchain read these: the renderer compiles them at init (or loads a precompiled artifact keyed by their text), and the device build script compiles the same text ahead of time. They live here, below the backends, so the two can never disagree about what a program’s source is – the content-addressed shader cache keys on exactly this text.

Constants§

AUTO_EXPOSURE
auto_exposure.slang.
BLOOM
bloom.slang.
COMPOSITE
composite.slang.
DECAL
decal.slang.
FOG
fog.slang.
FULLSCREEN
fullscreen.slang.
GBUFFER_PREPASS
gbuffer_prepass.slang.
GLASS
glass.slang.
GLASS_MESH
glass_mesh.slang.
HIZ_BUILD
hiz_build.slang.
LIGHT_CULL
light_cull.slang.
LINE
line.slang.
MAIN_BINDLESS
main_bindless.slang.
OBJECT_COMMON
object_common.slang.
PARTICLE
particle.slang.
PARTICLE_SIMULATE
particle_simulate.slang.
PARTICLE_TYPES
particle_types.slang.
POST_COMMON
post_common.slang.
PROBE_COMMON
probe_common.slang.
PROBE_TYPES
probe_types.slang.
REFLECTION
reflection.slang.
RT_REFLECTIONS
rt_reflections.slang.
RT_SKIN
rt_skin.slang.
RT_TRACE
rt_trace.slang.
RT_TYPES
rt_types.slang.
SHADOW
shadow.slang.
SOURCES
Every embedded shader, as (file name, source). embedded looks up by name; a build script iterating the set walks this table.
SSAO
ssao.slang.
SSGI
ssgi.slang.
SSR
ssr.slang.
TAA
taa.slang.
TEXT
text.slang.
WATER
water.slang.

Functions§

embedded
One shader’s embedded text, by file name.