Thứ Sáu, 17 tháng 10, 2014

Improved Ray Cast Command

Spent most of the day improving a central command called INTERSECT ALL which is used by both enemies and the player. The old implementation was good enough, but given it's heavy use and it's tendency to create performance spikes, I decided to implement some better ways of doing the same thing.


The new system first collects all the collision boxes that are touched by the ray, and then sorts them by distance, and only then does it go through the polygons associated with each box.  This way I get very early exits when the ray does not pass through any boxes, and a minimal traversal of polygons when it does hit something. Thanks to the internal team for their ideas on this, and it definitely solved the performance spike issues.

I was set to do some work on explosion improvements, but the decision was taken to spend two more days on visuals next week, namely TONE MAPPING and AMBIANCE FROM SKYBOX which will combine to create a better light balance in the scene. My minor concern is that both of these might require a small performance hit so it will be interesting to see what the trade-off and benefits are when these techniques have been implemented.  The good news is that FPSC Classic had a sort of tone mapper shader, so I will be looking to dig that out as a starting point.

Không có nhận xét nào:

Đăng nhận xét