WebGPU RT: port Sponza to wavefront (shadow ray in SHADE)
Restructure Sponza for the wavefront model: raygen emits the primary ray; closesthit (in SHADE) gathers albedo/normal, accumulates ambient, and emits a shadow ray carrying the pending direct term; miss adds the sky (primary) or the direct term (shadow miss). resolve.wgsl applies the same Reinhard+gamma the megakernel raygen did inline. User bindings moved to group 3 (groups 0..2 reserved). RTPass maxDepth=2. Renders the atrium correctly through the wavefront pipeline (textures, two-sided shading, sun+ambient, shadows, tonemap). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1d2e12dbc9
commit
376e66aeed
6 changed files with 70 additions and 134 deletions
|
|
@ -82,6 +82,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
cfg.files.emplace_back(fs::path("raygen.wgsl"));
|
||||
cfg.files.emplace_back(fs::path("closesthit.wgsl"));
|
||||
cfg.files.emplace_back(fs::path("miss.wgsl"));
|
||||
cfg.files.emplace_back(fs::path("resolve.wgsl"));
|
||||
EnableWasiBrowserRuntime(cfg);
|
||||
} else {
|
||||
cfg.shaders.emplace_back(fs::path("raygen.glsl"), std::string("main"), ShaderType::RayGen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue