Realistic Raytracer
Root / Submissions / [.]
SimeonCreated:
Download:EKR432HEVersion:1.0Size:7.8KB
A slow, yet realistic raytracing engine that handles sphere luminance, light refractions, and reflections.
Replying to:snail_
Raytracing*
Not to be THAT guy, but raycasting is when you shoot rays into a 2D map to figure out wall distance etc. Ray TRACING is when you follow light rays backward from the camera to the scene.
Regardless, nice work.
Oh, oops, thanks!
Replying to:snail_
Raytracing*
Not to be THAT guy, but raycasting is when you shoot rays into a 2D map to figure out wall distance etc. Ray TRACING is when you follow light rays backward from the camera to the scene.
Regardless, nice work.
Lol, I was waiting for someone to point that out. (By the way, great work Simeon)
I've been trying to figure that out too. It isn't supposed to be like that
Nathaniel generated this:
Not on a 3DS, but that is what the result should look like
I will update the key if I can find out what's causing the problem.
Quick thing, to edit the quality of the rendering, change STEPSZ at the beginning
So you think maybe possibly you could make this faster?
Simulated floating points I think are a bad idea, usually end up being slower
But it's possible that you're correct
I don't fully understand the code myself either (since it's a port) so good luck to you but if you are right then the fix is as easy as initializing the variables to 0.0
It's a little late for a response but I'll go back and look at the code, and see if I can improve performance and make the end result look better
Thanks!
SmileBASIC unfortunately can't run like this. This demo is running on the 3DS's actual CPU, while SmileBASIC operations have to go through interpreters and functions and abstractions, each slowing them down a little bit.
That's just a silly demo anyway. The 3DS's GPU can produce much better effects at a useful speed.
So, you could make something like that in SB, and it would be just as practical (as in, not at all practical) as the homebrew version.
There would be a point to this demo if it were rendering a realistic scene and not a few spheres.
It still works. It just makes 5x5 blocks instead of smaller ones. To change this, go into the code. There is a variable (forgot whatnit was called) at the very beginning. This variable is set as 5. Set it as something lower for better image (keep in mind it's slower) set as something higher for a horrible image that generates fast.