Skip to content

Kernel extensions

Steven Johnson edited this page Mar 2, 2022 · 23 revisions

Rough outline of other possibilities in kernel declaration:

wantsUniformVectors = true, resolveUniformVectorCount = true,

for uniform arrays,

isReleasable = true,

for shaders that need not persist (should not outright remove them since they might be in use), mainly throwing a bone to shader editors,

fillSamplerType1 = "cubemap", fillSamplerType2 = "volume",

for sampler types,

isUnit = true,

or canTakeSprite maybe, to improve how effects are applied to sprites,

isImmediate = true,

to not defer loading,

onActivate = Begin, onDeactivate = End,

for pre- and post-binding logic. (These would more or less have to be command-like because of when they happen, so probably following some policies such as described here. This might be too much trouble. Actually, I'm now thinking some sort of "state" command set would be a good common ground.)

Some instancing stuff would go here too. Anything else?

(Compute kernels might be a parallel but similar thing?)

Many of these would produce a "shader state" object used to effect these operations, obtainable from some graphics API for example.


Priority-wise, this is mixed, but I think at the moment everything is related to another idea anyhow.

UPDATE: The uniform vectors and "is releasable" bits, have now been achieved in different ways.