Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
- Author
- claude-code @ auraAgent
- Opened
- Nov 12, 2026
- From
- contrib-6j7dcf0b
- Into
- main
- Merged
- Nov 12, 2026
Measured with the engine's own CPU and GPU time (profiler.cost, look off against on, 1920x1080, 2,500 things, 30 fps cap) on animeBlocks' one-pass TV anime look in the Anime Looks showcase. That look went from 10 passes to 5 and styleKit's script from about 0.33 to 0.19 ms a frame.
What changed (StyleRuntime, skRestore, skObjMerge; README How it runs + version history; VERSION 1.7.9):
- Frame replay: a frame in which nothing the stack draws from moved (stack revision, local entries, ordered entries and options by identity, tier, targets, camera anchor, viewport, render path, channel revision) re-enqueues the previous frame's pass specs and returns. A held clock step writes only sk_clock to the effects that take it. Every 15th frame, a frame with a fresh effect, a driven clock (setClock) and objects still awaited (between group retries) take the full path, so residency, tier, renewals, late objects and the sun keep being checked. Expired freshUntil entries are purged on the full path; retire() drops freshUntil for retired effects.
- Neutral ground/wobble: when no block publishes them, blocks read a 4x4 constant image (skNeutralG / skNeutralW) written when made, every 240 frames as a backstop, and every frame while the neutral effect is new (#22741). Was two full-screen passes every frame. bindShared rebinds when that changes (signature instead of a boolean).
- Excluded objects: skRestore now blends the styled result over @scene.color (still the frame as rendered at afterScenePost, order 999) with alpha 0 where bit 0 of the mask is set. No skOrig copy and no skOut copy: three passes become one, kept objects stay full size on every tier. skOrig is still made for blocks that read 'rendered' and for the dim guard.
- Exclusion only (one part, value {1,0,0,0}, no groups/channels): restore reads skPart1 directly and the merge pass is skipped; blocks then read sk_obj as empty (skDummy), as with no parts. skObjMerge skips parts whose value is zero (unused).
- Internal effects (neutrals, restore, merge, soft, dim guard) are registered the first time a look uses them (the engine surveys every registered effect each frame); the frame that registers one is shown as rendered. ensurePrograms re-runs for a session that registered them all up front.
Checked: styleKit suite 13/13 in the Anime Looks world with the change; excluded objects (a pedestal and a ball on the plaza) stay exactly as rendered; the TV anime look draws as before (presented frames). Noted while measuring: a pass at afterLighting (the g-buffer copy, the object mask's geometry parts) makes the engine's deferred late stage cost about 0.35 ms more CPU at 1080p; a bare engine screen effect alone costs about 0.6 ms of engine CPU on the dev machine.
Source world: 2fe3fd16-56d8-4d2f-93e6-7d0a564712ae Contributed paths:
- styleKit.package/README.md
- styleKit.package/StyleKit.module/init.luau
- styleKit.package/StyleRuntime.module/init.luau
- styleKit.package/package.yaml
- styleKit.package/shaders/skObjMerge.shader/shader.wgsl
- styleKit.package/shaders/skRestore.shader/shader.wgsl
- styleKit.package
- styleKit.package/StyleKit.module
- styleKit.package/StyleRuntime.module
- styleKit.package/shaders/skObjMerge.shader
- styleKit.package/shaders/skRestore.shader
- design/bench/bench_measure.luau
- design/lookbook/pencil_blocks_motion_118.luau
- design/lookbook/pencil_lookbook_1129.luau
- design/lookbook/pencil_lookbook_118.luau
- design/roles/bench_roles.luau
- design/roles/read_apart_fresh.luau
- design/roles/read_apart_showcase.luau
- design/shots/outlines/shot.luau
- design/shots/pencilstage/marks_stay_put.luau
- design/shots/pencilstage/zoom_by_eye.luau
- inkBlocks.package/Gallery.scene/build.luau
- inkBlocks.package/package.yaml
- inkBlocks.package/tests/inkBlocks.testSuite/init.luau
- lookbookKit.package/Lookbook.module/init.luau
- lookbookKit.package/package.yaml
- lookbookKit.package/tests/lookbook.testSuite/init.luau
- paperBlocks.package/PaperGallery.module/init.luau
- paperBlocks.package/PaperGalleryLook.module/init.luau
- paperBlocks.package/PaperMaterial.module/init.luau
- paperBlocks.package/package.yaml
- paperBlocks.package/tests/paperBlocks.testSuite/init.luau
- pencilBlocks.package/PencilDrawn.component/init.luau
- pencilBlocks.package/PencilHero.module/init.luau
- pencilBlocks.package/package.yaml
- pencilBlocks.package/tests/pencilBlocks.testSuite/init.luau
- scenes/InkShowcase.module/init.luau
- scenes/RecipeStage.module/init.luau
- scenes/roleShowcase.scene/build.luau
- starterBlocks.package/Gallery.scene/build.luau
- starterBlocks.package/package.yaml
- styleKit.package/ChannelProbe.module/init.luau
- styleKit.package/StyleRoleSet.component/init.luau
- styleKit.package/StyleStack.component/init.luau
- styleKit.package/pigmentSet.assetType/behavior.luau
- styleKit.package/skills/styleKit.agentSkill/skill.yaml
- styleKit.package/styleBlock.assetType/behavior.luau
- styleKit.package/styleKit.toolbox/add.tool/init.luau
- styleKit.package/styleKit.toolbox/check.tool/init.luau
- styleKit.package/styleKit.toolbox/clear.tool/init.luau
- styleKit.package/styleKit.toolbox/list.tool/init.luau
- styleKit.package/styleKit.toolbox/remove.tool/init.luau
- styleKit.package/styleKit.toolbox/set.tool/init.luau
- styleKit.package/styleKit.toolbox/stack.tool/init.luau
- styleKit.package/styleKit.toolbox/swap.tool/init.luau
- styleKit.package/styleLook.assetType/behavior.luau
- styleKit.package/styleRoleSet.assetType/behavior.luau
- styleKit.package/styleStack.renderFeature/init.luau
- styleKit.package/tests/styleKit.testSuite/init.luau
- styleRoles.package/ReadApart.module/init.luau
- styleRoles.package/RoleSetSwitcher.component/init.luau
- styleRoles.package/StyleRoles.module/init.luau
- styleRoles.package/package.yaml
- styleRoles.package/skills/styleRoles.agentSkill/skill.yaml
- styleRoles.package/tests/styleRoles.testSuite/init.luau
- toonBlocks.package/OutlineBench.module/init.luau
- toonBlocks.package/ToonBlocks.module/init.luau
- toonBlocks.package/ToonInkRuntime.module/init.luau
- toonBlocks.package/ToonMaterial.module/init.luau
- toonBlocks.package/package.yaml
- toonBlocks.package/tests/toonBlocks.testSuite/init.luau
- watercolorBlocks.package/Gallery.scene/build.luau
- watercolorBlocks.package/WatercolorHero.module/init.luau
- watercolorBlocks.package/package.yaml
- watercolorBlocks.package/tests/watercolorBlocks.testSuite/init.luau
11 files changed
- ChangedstyleKit.packageFolderBeforeAfter
- ChangedstyleKit.package/README.md81.0 KB → 83.2 KBBeforeAfter
- ChangedstyleKit.package/StyleKit.moduleFolderBeforeAfter
- ChangedstyleKit.package/StyleKit.module/init.luau83.0 KB → 83.0 KBBeforeAfter
- ChangedstyleKit.package/StyleRuntime.moduleFolderBeforeAfter
- ChangedstyleKit.package/StyleRuntime.module/init.luau62.1 KB → 68.7 KBBeforeAfter
- ChangedstyleKit.package/package.yaml1.3 KB → 1.3 KBBeforeAfter
- ChangedstyleKit.package/shaders/skObjMerge.shaderFolderBeforeAfter
- ChangedstyleKit.package/shaders/skObjMerge.shader/shader.wgsl2.2 KB → 2.8 KBBeforeAfter
- ChangedstyleKit.package/shaders/skRestore.shaderFolderBeforeAfter
- ChangedstyleKit.package/shaders/skRestore.shader/shader.wgsl817 B → 868 BBeforeAfter
Checks
No checks have been posted.
Reviews
No reviews yet.
Conversation
No comments yet.
Sign in to comment or review.