This project is a simple ray tracing application that renders a 3D scene using the Walnut framework. The application includes a graphical user interface (GUI) for interacting with the rendering settings.
- Ray tracing rendering
- Adjustable rendering settings via GUI
- Real-time updates
- Visual Studio 2022
- C++17 compatible compiler
- Walnut framework
-
Clone the repository.
-
Open the solution file
RayTracing.slnin Visual Studio 2022. -
Select
Releaseandx64as your configuration. -
Build the solution by selecting
Build > Build Solutionfrom the menu.
-
After building the solution, run the application by selecting
Debug > Start Debuggingor pressingF5. -
The application window will open, displaying the rendered scene and the GUI.
The GUI is built using the ImGui library and provides controls for interacting with the rendering settings.
- Settings Window: This window contains various controls for adjusting the rendering settings.
- Last Render Time: Displays the time taken for the last render in milliseconds.
- Render Button: Triggers a new render.
- Sphere Color: Allows the user to adjust the color of the rendered sphere.
The ExampleLayer class is responsible for rendering the GUI. It inherits from Walnut::Layer and overrides
the OnUIRender method to create the GUI elements.
The Renderer class handles the actual rendering of the scene. It provides methods for resizing the render
target and rendering the scene with different settings.