A
A
agur_e2021-08-31 00:31:22
JavaScript
agur_e, 2021-08-31 00:31:22

Raycasting, What is the best way to do these 2 million spatial checks?

A couple of days ago, I became very interested in how frames are drawn in games, after reading a couple of smart articles and watching all the incredibly smart videos on this topic, I tried to implement my simple program for drawing a small scene.

I did it on js because it's just easier and is done in order to play around and understand how it all works.
The field of how I compared my work with various introductory demos of some coding geniuses, but I was simply incredibly surprised how much the rendering time of my even simpler scene differs from the frame rendering time of the programs of coding geniuses and wondered. How to yep like that?

My program renders a scene in over half a minute when coding genius programs do it with more complex scenes and shadow rendering over 10 times faster (both render on cpu).

At what point did I make a mistake when designing my program? please help me, I really want to understand 3d and learn how to make my own 3d projects.

here is my program - https://github.com/aguree/js-3d-engine

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question