r/GraphicsProgramming • • 20d ago

Rendering with a light simulation 2.0

Working more on rendering with light simulation!

(The video is, of course, in real-time)

Previous post about this was Some spheres rendered with a light simulation

Rendering method is mostly the same, just some optimizations and scene work

I've put a web version on Github: moonlightoctopus1.github.io/Renderer/

Actual rendering is just simulating light with a lot of optimizations :P

280 Upvotes

27 comments sorted by

View all comments

Show parent comment

9

u/mooonlightoctopus 20d ago edited 20d ago

Triangles are hard :-P, One of the things I'm working on
I think that they are possible?

-1

u/Many_Difficulty_490 20d ago

r u being sarcastic?

17

u/speps 20d ago

He might be using SDF to model the scene, so maybe not straightforward to integrate a triangle mesh.

4

u/yaboiaseed 19d ago

He's probably talking about how difficult it is to reach this level of graphics programming from a basic triangle program, not if you can add triangles to this renderer.

8

u/mooonlightoctopus 19d ago

No,
For the scene here I was simply using analytical boxes/spheres

1

u/Le_9k_Redditor 19d ago

Analytical triangles are of course possible, I did it before as a plane intersection + barycentric coordinates to check if the ray was within the triangle bounds or not