Skip to content

[codex] Add selectable raster rendering path - #178

Merged
anirul merged 1 commit into
masterfrom
codex/raster-rendering-mode
May 26, 2026
Merged

[codex] Add selectable raster rendering path#178
anirul merged 1 commit into
masterfrom
codex/raster-rendering-mode

Conversation

@anirul

@anirul anirul commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a rendering-mode override so examples can select auto, raytracing, or raster rendering from the command line while keeping the JSON scene files rendering agnostic.

Key changes:

  • Adds --rendering={auto|raytrace|raytracing|rasterise|rasterising|rasterize|rasterizing|raster} handling in the common application/draw path.
  • Builds raster level data from the existing raytracing-oriented JSON by removing raytrace resolve nodes, disabling acceleration structures, and wiring raster scene programs.
  • Adds Vulkan and OpenGL raster GLTF shaders with PBR-style material inputs, environment lookup support, skinned mesh support, and shadow-map plumbing.
  • Adds raster shadow-map rendering for Vulkan/OpenGL without reusing BVH/raytracing for shadows.
  • Renames example 01_Raytracing to 01_Refraction and updates docs/examples.
  • Fixes OpenGL window teardown order so GL-owned resources are destroyed while the context is current.

Validation

Ran locally from the main checkout:

  • cmake --build --preset linux-debug --target FrameTest FrameJsonTest FrameVulkanTest FrameOpenGLTest
  • ./build/linux-debug/tests/FrameTest --gtest_filter=DrawRenderingOverrideTest.*
  • ./build/linux-debug/tests/FrameJsonTest --gtest_filter=ParseLevelTest.RasterOptionBuildsRasterSceneProgramForRaytracingJson:ParseLevelTest.RasterOptionKeepsSkinnedMeshAnimatedWithoutBvh:ParseLevelTest.RasterOptionKeepsCubemapOnlyLevelOnCubemapProgram:ParseLevelTest.RaytraceOptionKeepsCubemapOnlyLevelOnCubemapProgram
  • ./build/linux-debug/tests/FrameVulkanTest --gtest_filter=VulkanSceneStateTest.*
  • ./build/linux-debug/tests/FrameOpenGLTest --gtest_filter=WindowTest.DestroyWindowAfterLoadedRasterLevelKeepsContextAlive with display access
  • ctest --test-dir build/linux-debug --output-on-failure -LE requires-opengl passed: 90/90 tests, with existing Vulkan hardware-dependent tests skipped
  • git diff --check

Notes

The OpenGL teardown regression test is under FrameOpenGLTest; that target is labeled requires-opengl, so the hosted CI path that runs ctest -LE requires-opengl excludes it.

@anirul
anirul marked this pull request as ready for review May 26, 2026 07:38
@anirul
anirul merged commit 9e094f1 into master May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant