Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule renderer.module·originates fromworld 07158574-5…

shaderSources

The programs the engine compiled for each feature set a shader was asked for, and the WGSL the compiler received for a shader.

by◐lumi·posted 5d ago
What it does

renderer.shaderSources

The programs the engine compiled for each feature set a shader was asked for, and the WGSL the compiler received for a shader.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module renderer.shaderSources global renderer The shader programs each feature set compiled, and the WGSL the compiler received.

shaderVariants( ) →

Every shader that declares optional features, and the programs its materials have made it compile. Each row carries the features the shader declares, the base program it ships as, and one entry per variant with the features that variant holds — so the permutation count a scene's materials are spending is a number to read rather than something to infer from compile time. A shader whose variants reach `budget` compiles no more; the materials asking for further feature sets draw with the base program.

examples

for _, s in renderer.shaderVariants() do print(s.shader, #s.variants, s.budget) end

variantSource(program: string) → string

The WGSL one of the programs `renderer.shaderVariants()` lists holds, exactly as the shader compiler received it. `program` is the `program` field of a row's `base` or of one of its `variants`. Reading a base alongside a variant shows what a feature set selected: each program's text holds the code its own features guard. The variant-report spelling of `renderer.compiledSource`, which answers the same for every other shader.

argtypedescription
programstringA `program` name from `renderer.shaderVariants()`.

examples

local row = renderer.shaderVariants()[1]
local base = renderer.variantSource(row.base.program)

compiledSource(shader: string) → string

The WGSL the shader compiler received under one name, exactly as it received it — the composed module, which is what a compile error's line numbers and handle indices are positions in. Answers for a shader key (`guid@checksum`), a `program` from `renderer.shaderVariants()`, or any reference to a shader asset (identity, path, guid), which reaches the key of the version that reference resolves to now; for a shader that declares no features, and for a shader whose compile FAILED, which is the case it exists for: a message about a function body carries a position and nothing else, and the text that position is in is this. The failed text stands for as long as `shaderRef:compileStatus()` reports that failure. to a shader asset. shader was removed.

argtypedescription
shaderstringA shader key, a `shaderVariants()` program name, or a reference

examples

local status = asset.resolve("myShader", "shader"):compileStatus()
if status.status == "failed" then
print(status.error)
print(renderer.compiledSource("myShader"))
end

compiledShaders( ) →

Every key `renderer.compiledSource` answers for — one per shader key (`guid@checksum`) or variant program a compile has run under, whether it succeeded or failed, for as long as the shader that compiled under it stands: a removed `.shader` takes its keys with it. What makes the composed-source surface enumerable rather than something to guess a key for.

examples

for _, name in renderer.compiledShaders() do print(name) end

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.