295
« on: August 29, 2017, 05:05:30 am »
I removed gouraud shading because it's much slower with it (25% at 60 fps). The "slow" performance is in fact between 30 and 60 fps on real hardware. I just need to add precalculated visibility and I should be able to hit 60 fps. If not I will just display a low quality model at distance and use lower quality textures on that model. Either way, I will get to stable 60 fps, I just need lot of work to get there, but I'm confident.
Precalculated visibility is my next headache, I plan to just subdivide the map in a few zones (say 64 zones) and do ray tracing checks (on the PC) at the limits and middle of each zone, then store the results compressed in an interger. So say I'm at zone 2 and can potentially see 6 meshes (out of 32 as an example) from there, I will just flip the bits of that integer to 1, the rest to 0. If I have 128 meshes, I will need 4 integers per zone (like 64 again), which means it will only take 256 bytes, which isn't too bad for the huge speed gain. Anyway, that's the plan for now, it might not work when I try it and it won't be that easy to pull.