|
Post by lucius on May 16, 2020 7:43:54 GMT
I have been reverse-engineering the Dark Forces executable in order to figure out how it works, exactly, so that The Force Engine can truly be "source port" accurate. Figuring out how the AI works, player movement, collision detection, etc. is very important but this series of posts will start with rendering. These posts will talk about how Dark Forces rendering works in DOS and how the "Classic" Software Renderer works in the Force Engine (or will work as more work needs to be done there). Note that I will be showing some code snippets, these are directly from the reverse-engineered work and represent what is actually happening in Dark Forces. However, I obviously won't be showing all of the code here and instead just snippets as needed. ... Read the Full Post
|
|
|
Post by Karjala on Jun 13, 2020 5:36:38 GMT
Great post looking forward to part 2 . Btw why does it cull twice?
|
|
|
Post by lucius on Jun 13, 2020 20:08:38 GMT
Great post looking forward to part 2 . Btw why does it cull twice? That is what the original DOS code does. - As for the reason, the first culling stage is in View Space and the second in screen (pixel) space. You want to cull before clipping since that is somewhat expensive. So I think they re-check in pixel space after projection just to be sure since there could be corner cases where something is visible in view space but becomes degenerate in pixel space.
|
|