Conversation
Notices
-
The VGA memory is always the bottleneck. The normal mapping and specular is absolutely destroying the framerate, not from the fragment shader but from the dirtying of the framebuffer.
Meanwhile I try to implement per-line draw, instead of per-color draw. To prevent color tearing in favor of screen tearing. It's slower though, by quite a bit, having to change the color plane every horizontal line draw. This is even fairly optimized code.
I got the idea of playing with interlacing, and inserted a bug where dirty pixels never get updated because they were on the off-frame, but that's just extra performance if you consider it a glitchy aesthetic choice.
What do you think of the interlacing style? It really does help the FPS.
-
@Inginsub the cost of VGA memory transfer is orders of magnitude greater than any single thing in my game.
-
@Inginsub I only update dirty pixels, but I break it into 8 byte blocks like Terry does. Dirty bits are tracked 8 pixels wide, 8 pixels transferred at a time. I don't know if a 8bit MOV is different than a 64bit MOV for the VGA memory bus or whatever.
-
@crunklord420 Don't, just assume that you have to redraw the entire screen every frame. It's likely true anyway, except if the camera doesn't move at all.
-
@crunklord420 what does the third loop do? do you update the buffer dword by dword instead of line by line? try using memcpy unconditionally
-
@crunklord420 why are you updating DC and not the VGA buffer directly?
-
@Inginsub I am updating the FB directly, even the WindowManager is suspended (but that's not required I don't think since it should never update the screen if I never dirty the framebuffer).
-
@Inginsub am I missing something with this framerate? This runs at like 60 FPS if I'm not moving around.
-
@crunklord420 benchmark it