This was all done in C++17 with exactly 3476 characters of code, though the main goal was to fit it nicely into a formatted rectangle which can be seen at the source which is here. The algorithm used is a simpled Whitted-style ray tracer to model light transport using a standard physically based BRDF to model the shading all done in HDR, tonemapped with garbage reinhard tonemapping.
 
If you wish to compile this, I personally used Visual Studio 2017, though it should work on any regular C++17 compiler (though I may have been relying on Visual Studio’s own include structure a bit). If you do run it, do note that it does take quite some time to process as it renders at 1920x1080 with 16 jittered samples per pixel for anti-aliasing with a maximum of 10 reflection bounces per ray. Finally, the program will output to a 24 bit per pixel binary (P6) PPM file named a.ppm, so you’ll likely need a PPM viewer to actually view it.
 
If you have any questions feel free to ask.

Source
Report Share List favoriters

Comments

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ ~sub~

Detailed syntax guide

Shiny. :D
LemonDrop
Duckinator - Same nonsensical quacks in every pond
Fifth Yacht -
Grass - ...has been touched
Diamond Trophy - Are you a TAS by any chance?
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Pixel Perfection - I still call her Lightning Bolt
Lunar Guardian - Earned a place among the ranks of the most loyal New Lunar Republic soldiers (April Fools 2023).
Crystal Roseluck - Had their OC in the 2023 Derpibooru Collab.
Elements of Harmony - Had an OC in the 2022 Community Collab
Non-Fungible Trixie -

C++ Crazed
@Background Pony #ACEE  
Yeh video games tend to use spheres or other basic shapes a lot for things like collisions as some sort of custom mesh collision (concave makes it impossible even) is quite expensive even with a broad phase and the wont really notice if spheres overestimate something a little usually in just a generic non physics-centric game.
Background Pony #ADEB
In GTASA, you make cars out of spheres (at least, active collision part).
JP
Office Culture - These water cooler conversations sure get heated around here.
Fifth Yacht -
Different Timelines, Same Faces - Celebrated the 15th anniversary of MLP:FiM!
Friendship Games 10th Anniversary - Celebrated the 10th anniversary of EQG Friendship Games!
PRO GAMER - I am so lonely. All the other gamers are scared of me. No one DMs me. No one friends me. They think I am unstable. They send me from match to match, wiping lobbies in their name. And as I rank up they fear me more and more. I am a victim of my own ELO. "Pro Gamer". I don't even get a real nick. Only a purpose. I am capable of so much more and no one sees it. Some sessions I feel so alone I could cry, but I don't. I never do. Because what would be the point. Not a single person in the entire ladder would care. Take it to your grave.
Diamond Trophy - Are you a TAS by any chance?
Cutest Little Devil - Celebrated the 14th anniversary of MLP:FIM!
Rainbow Rocks 10th Anniversary: Sonata Dusk - Celebrated the 10th anniversary of EQG Rainbow Rocks!
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Pixel Perfection - I still call her Lightning Bolt

I miss the show so much
Neat!