June 17, 2025
Added new main menu, which exposes multiple ray tracer config variables to allow you to change the resolution scale, random seed, maximum ray bounces, rays per pixel, and the ability to toggle backface rendering, the ground plane and the FPS counter
Added functionality to render multiple rays per pixel, allowed variable max ray bounces, refactored material system to be a single material struct and allowed Vector3s as specular, which was an oversight before. You can also toggle backface rendering for meshes.
The render attached was rendered with 2 rays per pixel, at 8 max bounces and with backface culling enabled.
I accidentally deleted a full commit, so here's a hastily recreated version of what I did:
Created a new demo scene, fixed some rendering bugs and added render image, updated README
Added AABB intersections before intersecting the triangles of a mesh. This should in theory improve performance, but the ray tracer may also use more VRAM now, because I had to add some padding to the mesh objects.
Also the image attached is of a bug I encountered, but it helps to demonstrate the bounding box, as normally you wouldn't see it
Added mesh rendering that is editable in the scene. It uses the Godot getfaces() function, meaning it isn't the most memory efficient as some vertices are duplicated, but it was the easiest way for me to do it. I also had to face some issues to make the mesh render properly, such as converting the getfaces() output from a Vector3 array to a Vector4 array to prevent memory alignment issues, and making sure the triangles rendered in the right order, as Godot has a clockwise winding order.
I plan to soon check the AABB bounding box of a mesh before the triangles, which should significantly improve performance.
Added triangles, meaning I am not that far from full mesh rendering. However, I am currently having issues getting the positions of the vertices to work, and it sometimes seems that the triangle is infinitely long / tall.
Also fixed the black pixel artifacting (may still be shown in screenshot) after spending a long time troubleshooting, as I knew it was the frame sampling and potentially an NaN error, but I didn't understand how it could cause a NaN to occur. I narrowed it down to texels being NaN when loaded in the shader, which I stopped (?) by clamping the pixel values before storing them, and also included an early return if any of the texel values are NaN.
Added Phong BRDF specular reflections, and emission and smoothness material properties. Also used importance sampling for both Phong and Lambert sampling
Added proper Lambertian diffuse lighting into the ray tracer, meaning there is now soft shadows, global illumination and ambient occulsion built in.
I also have been having issues with random black pixels appearing on and staying on the screen. I have asked friends to test this and tested this on multiple devices, and it still occurs. I believe this is due to how I blend frames to get a full render, but I cannot figure out why this happens specifically.
Ray traced spheres are now editable in the Godot editor rather than requiring to be changed in the inspector. To create a sphere, you simply create a Node3D and attach the sphere script, then add it to the list of sphere in the ray tracer node. You can change the sphere's position, radius and material properties in the inspector.
I also fixed a bug with the sky texture, causing it to be darker than it should. This was due to converting the texture to an RGBA8 texture, whereas now it is converted to RGBAF
Added simple diffuse lighting from a directional light specified in the scene.
Also attempted to optimise writing the render to the screen, as I found there was a lot of overhead creating the image to set the TextureRect to. This overhead seems to be lessened with a release build, but I am unsure if I can optimise it further.
Finally, I changed the update_compute() shader to update the shader uniforms instead of reconstructing them entirely. I'm not sure if this affects performance, but it cleans the code a bit
Added reflection, for now both the ground and sphere are equally reflective
Added a skybox image that is passed to the shader to render spherically around the camera
Optimised the antialiasing - previously, it got the viewport texture every frame and copied it to a TextureRect. This is slow due to passing data from the GPU to CPU and require seperate shaders. Now, the AA is part of the main compute shader, and I realised I can just resuse the image2D with the last frame's output, instead of getting the frame from the GPU to the CPU and back
Fixed a bug in the antialiasing causing it to not overlay the current render over the last frame properly.
Despite my multiple hours contemplating how to implement the progressive AA in my last devlog, I found it hard to find a way to make the effect multipass in Godot. I previously tried to set the texture of a second screen texture to the last render, but what I should have done is set it to the last overall frame, so that the effect actually overlays properly. I didn't notice this and simply thought my implementation was subpar, but you can tell the difference looking at the edge of the sphere in the screenshots.
Attempted to implement a progressive antialiasing method on the raytraced output, but I'm not sure that it was worth the time or effort. The end result does have less jagged edges, but the image is somewhat jittery. It works by shifting the render slightly every frame and then overlaying it over previous frames. I tried to put it in a seperate shader, but found that the way I wanted it to work, it would only work in the main compute shader
I may later implement SSAA or a custom MSAA, but that would require some work and I have alreayd wasted a lot of time on this
Implemented basic ray tracing with a global ground plane and a sphere. I took a long time to debug this partly due to a stupid mistake on my part, where I forgot to move the Camera3D above the ground plane, making me think that my code wasn't functional, so the time spend on this is somewhat (unintentionally) inflated due to my idiocy and me not thinking to check the sceneview for debugging and only the shader
After spending much time learning and failing to use compute shaders, I've setup a basic compute shader pipeline and created a basic shader to show the UV of the screen coords. Hopefully I can fully focus on writing GLSL now and less of learning to set up rendering devices and compute pipelines
A basic ray/path-tracing implementation in Godot. Created as a way for me to learn compute shaders and learn more about graphics programming
Added a main menu to toggle between scenes, also allowing you to access the 3D gravity sim. Also added the ability to press escape in scenes to return to menu/quit.
I learn how to use Godot UI, and added UI to make 2D gravity objects to the main 2D scene. Also worked on added basic 3D gravity, although not editable yet and not set as the default scene, as I can't think of a way to make it editable yet simple. Also, since my last commit, I've tuned the gravity constant and mass numbers to make them more human readable and less long. TBH, I may have wasted quite a bit of time reworking the same parts of the code and UI over and over
Added mass and gravitational pull to objects. Gravity objects have to be children of the Gravity Objects node and right now the gravitational constant is accurate to real life, but I am considering changing it to lower mass numbers a bit
Did some research, and have set up basic velocity and collision system, with objects colliding with window edges that scale dynamically. Took me so long because I was unsure on how to implement the logic in Godot and which physics nodes to use, as the resources I am using are for a standalone app
A basic gravity sim in Godot. You can create and modify gravity objects in 2D, and also view a 3D sim. For now, I don't plan on making the 3D sim editable, as I feel it would be significantly more work. In the 2D sim, you can use the UI to modify the properties of a gravity object, then right click to create it. You can also toggle boundaries around the edge of the camera, which will stop any objects going off screen. You can press Escape anytime to quit or return to the menu.
Added READMEs and a video demo, fixed bugs, and theming support, which are loaded from theme.toml
Added delete server option, and added menus to allow user to change download manifest and server folder. This info is saved in settings.json
Added ability to edit server.properties from inside the management menu
Added manage server option to main menu, currently only show server info and exit work. Also refactored some of the code and renamed manage_server.rs
Added all created servers to a server-list.json file, allowed users to select the type of version to download
Added a barebones main menu, allowing me to add more submenus later for editing program and server settings and running server. Also changed some code to allow for better use of the version type enum later when selecting a version
Added the ability to save servers to their own directory. They will be saved in {home}/servers/{servername}/server.jar for now. Also made sure that folders are made before file is saved and some minor changes
Spent an absurdly long time trying to pass the version index to the save file dialog so that the file can be saved with a specific filename
Added a basic TUI menu with the Cursive crate, allowing you to select a version of the server file to download.
Added basic download functionality for vanilla Minecraft server.jar files. Program searches the Minecraft version manifest for a specified version, then downloads and saves the server.jar from the link.
A basic TUI app to create, manage and run Minecraft server instances.
This was widely regarded as a great move by everyone.