| Age | Commit message (Collapse) | Author |
|
- Add Effect::wire_dag() virtual (called from init_effect_nodes after full DAG built)
- Add Effect::find_downstream_output() protected helper (first downstream consumer output)
- GBufferEffect::wire_dag() auto-sets cnn_output_node_ via find_downstream_output,
guarding against sink (external view, null texture)
- GBufferEffect::post_render() null-checks src texture before CopyTextureToTexture
- Tests: find_downstream_output cases + wire_dag integration in test_effect_base
- Doc: SEQUENCE.md updated with wire_dag pattern, helper contract, and sink guard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Add Effect::post_render() virtual hook, called after all effects in
the sequence have rendered each frame. Default is no-op.
- Sequence::render_effects() runs a second pass invoking post_render()
on all DAG nodes after the render pass completes.
- GBufferEffect: declare internal node_prev_tex_ (U8X4_NORM) for
persistent prev-frame CNN output. post_render() copies cnn_output_node_
→ node_prev_tex_ via CopyTextureToTexture. render() binds node_prev_tex_
as prev_cnn (binding 6) — zero on frame 0 (matches training convention).
- Expose set_cnn_output_node(name) API; call once at setup.
- Drop brittle ping-pong / input_nodes_[0] fallback.
- Update doc/SEQUENCE.md: post_render() semantics, frame execution order,
temporal feedback canonical pattern, node types table with G-buffer types.
- Update cnn_v3/docs/HOWTO.md: temporal feedback wiring section.
36/36 tests passing.
handoff(Gemini): prev.rgb temporal feedback now correct and generic.
Set set_cnn_output_node("sink") (or CNN output node name) once at setup.
|
|
Remove dead code and reduce duplication:
- drop create_bilinear_sampler() (never called)
- drop update_pack_bind_group() stub and pack_bind_group_ member
- drop node_feat0_/node_feat1_; use output_nodes_[0/1] directly
- Compose({}, src) consistently for all three pipelines
- extract clear_r8_node() helper to replace two identical 10-line blocks
No behavior change. 36/36 tests pass.
|
|
Implements gbuf_shadow.wgsl: fullscreen render pass that reads depth
from Pass 1, reconstructs world-space positions, evaluates a proxy-box
SDF for each object (via inv_model), computes soft shadows for both
directional lights using shadowWithStoredDistance(), and writes shadow
factor to the RGBA8Unorm node_shadow_ target consumed by gbuf_pack.wgsl.
Bind layout: B0=GlobalUniforms, B1=ObjectsBuffer (storage-read),
B2=texture_depth_2d, B3=GBufLightsUniforms.
Sky fragments (depth=1.0) are output as 1.0 (fully lit).
Falls back to clear(1.0) if pipeline is not ready.
36/36 tests pass.
handoff(Gemini): Pass 2 done. Pass 3 (transparency) still TODO.
Phase 4 (type-aware SDF) optional after visual validation.
|
|
GBufferEffect:
- set_scene() now owns Scene/Camera internally; no external pointers needed
- 20 randomly rotating cubes (xorshift32 seed, axis-angle animation)
- 4 pumping spheres (radius = base_r * (1 + audio_intensity * 0.8))
- Camera at (0,2.5,6) looking at origin; aspect updated per-frame
- GBufLightsUniforms: 2 directional lights (warm key + cool fill)
- object_type written to ObjectData.params.x (ready for SDF shadow)
- shadow/transp nodes cleared via zero-draw render passes (placeholder)
- bilinear sampler cached via create_linear_sampler() / sampler_.get()
- dead placeholder textures removed
GBufViewEffect:
- gbuf_view.wgsl: all channels now fully grayscale (removed color tint)
- seq_compiler.py: GBufViewEffect added to CLASS_TO_HEADER
- timeline.seq: cnn_v3_test uses GBufViewEffect -> sink for debug view
Docs: HOWTO.md §1 updated with set_scene() description + §1b implementation
plan for Pass 2 SDF shadow (shader spec, bind layout, C++ additions)
handoff(Gemini): GBufferEffect has internal scene, 36/36 tests green.
Next: implement Pass 2 shadow (gbuf_shadow.wgsl) per §1b plan in HOWTO.md.
|
|
G-buffer (Phase 1):
- Add NodeTypes GBUF_ALBEDO/DEPTH32/R8/RGBA32UINT to NodeRegistry
- GBufferEffect: MRT raster pass (albedo+normal_mat+depth) + pack compute
- Shaders: gbuf_raster.wgsl (MRT), gbuf_pack.wgsl (feature packing, 32B/px)
- Shadow/SDF passes stubbed (placeholder textures), CMake integration deferred
Training infrastructure (Phase 2):
- blender_export.py: headless EXR export with all G-buffer render passes
- pack_blender_sample.py: EXR → per-channel PNGs (oct-normals, 1/z depth)
- pack_photo_sample.py: photo → zero-filled G-buffer sample layout
handoff(Gemini): G-buffer phases 3-5 remain (U-Net shaders, CNNv3Effect, parity)
|