Commit Graph
2 Commits
Author SHA1 Message Date
西风逍遥游 e4153ccdc7 graphics: make the outline configurable from scripts (color, width, etc.)
Expose the auto-applied pipeline outline and a script-friendly cube mesh so
the screen-space outline can be customized per-scene:

- Graphics.getOutline() -> the pipeline Outline used by the "outline"
  render feature (setColor, setWidth, thresholds, softness, clip)
- Graphics.newMeshCube(size) procedural cube factory (per-face normals +
  full UVs) for scripted 3D, exposed as gfx.newMeshCube()
- examples/outline/main.nut: interactive lab with editable color, width,
  depth/normal thresholds and softness at the top (keys: 1 toggle,
  [ / ] thickness, C cycle color)
- test/Outline.cpp: newMeshCube factory + pipeline config test; cube
  preview now uses the built-in cube mesh
2026-08-16 03:43:38 +08:00
西风逍遥游 0049d8fa84 graphics: add screen-space model outline from GBuffer depth + normal
Add a t3ssel8r-style screen-space outline computed from the G-buffer
hardware depth and world-normal buffers. For each pixel the shader
samples an 8-neighbourhood at a configurable width and flags depth
(silhouette/occlusion) and normal (crease) discontinuities, emitting
vec4(outlineColor, edgeMask) that is SrcAlpha-blended over the scene.

- new graphics::Outline class (mirrors AmbientOcclusion) with color,
  width, depth/normal thresholds, softness and clip knobs
- new outline_post.frag + compiled SPIR-V include + compile script
- RenderControl "outline" feature (implies gbuffer, default off) applied
  by RenderSystem3D after the forward/hair passes
- Graphics.newOutline + Squirrel binding + test/Outline.cpp (params,
  feature toggle, and an interactive cube preview)
2026-08-16 00:39:44 +08:00