Index of every page on this site: llms.txt
All skills
oahc09 avatar

/cocosair-rendering

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Configure lighting, shadows, render targets, MSAA and sRGB. Use for offscreen pixels, post-processing, AIR_E_RENDER_TARGET_SAMPLES or AIR_E_TEXTURE_COLOR.

  • 11 files
  • 159.1 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair-rendering

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestriggers.md

≈477 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rendering triggers

For the four switches called “Contracts” below, see Contracts. Source annotations refer to the AIR checkout.

When to use what

  • "Why is the scene the wrong brightness" -> DirectionalLight.illuminance (Lux) or SphereLight/PointLight/SpotLight luminousFlux/luminance; the HDR and LDR slots and every unit constant are in lighting-units.md.
  • "Which directional light is actually lighting my scene" -> inspectAirDirectionalLights(scene) (src/air/rendering/engine-contracts.ts:104).
  • "Why are there no shadows" -> the support grid in shadow-matrix.md, then the four switches in Contracts.
  • "Can this light type cast at all" -> PointLight has no shadow path in the source (src/cocos/render-scene/scene/point-light.ts:32); Sphere is never collected by the flow (src/cocos/rendering/shadow/shadow-flow.ts:122).
  • "Render a mirror, refraction or a second viewpoint into a texture" -> createAirRenderTarget(options) (src/air/rendering/render-target.ts:290) plus attachCamera(camera, beforeRender?) (:197); the raw path is camera.targetTexture.
  • "Feed that texture into a material after a resize" -> target.bindColor(material, property, passIdx?) (:257), bindDepth (:258), readColor(region?) for pixels (:262).
  • "Glass or gem refraction from a glTF material" -> AirTransmissionCapture (src/air/rendering/transmission-capture.ts:74), one per scene, with TRANSMISSION_LAYER (:29).
  • "Is this format plus this decode legal" -> resolveAirTextureFormat (src/air/rendering/color-contract.ts:21) and validateAirTextureColorContract (:38).
  • "Can I turn bloom on" -> postProcess is the only custom-pipeline-side name the default aggregate exports (src/exports/air.ts:39); director.root.usesCustomPipeline tells you which pipeline is live (src/cocos/root.ts:121).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ed38648. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
layer
subsystem
All 1 allowed tools
Read Edit Write Bash
Other metadata
compatibility
Cocos AIR source checkout or installed cocosair.js package. Browser rendering requires WebGL 2; source tooling requires Node.js >=18. Use the host-provided tools and user-authorized workspace.
when_to_use
[
  "scene brightness looks wrong",
  "no shadows from lights",
  "render mirror or refraction into a texture",
  "texture looks washed out after load",
  "can bloom or post-processing run"
]
owns
[
  "lighting",
  "shadows",
  "render-target",
  "msaa",
  "srgb",
  "post-process"
]
not_for
[
  "material property types -> cocosair-materials-effects",
  "camera framing or projection -> cocosair-camera",
  "DOM offscreen textures -> cocosair-graphics-and-dom"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "配置灯光、阴影、渲染目标、MSAA、颜色契约和管线可达性。用于光照、阴影、离屏渲染、读回或后处理问题。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-rendering