flexifor.blogg.se

Gothic 2 d3d11
Gothic 2 d3d11




I'm also not trying to eliminate draw-calls, because I get poor performance without them as well, so the cause must be something else.Īlso I've seen lists get generated per-frame of higher than 4kb and be fine, so that probably won't kill you, so long as you're not copying that list too much.ĨKB per frame is only 480 KB/s and modern cpu can handle about 25GB/s bandwith. I am currently doing frustum and distance culling, which works quite fast. So still 4kb.Įverything aside, what are the best options in such a case? The objects aren't all different, in fact I have loaded about 500 meshes right now, so I could go with instancing for the static stuff (using D3D11), but how do I handle frustum-culling then without updating all the constantbuffers every frame? However, I can't do that with the sorting-part. I then went by and made the lists static vectors, which won't get reduced in capacity over the frames, so there is no cleanup needed. That doesn't sound too good for realtime rendering, right? This list also gets copied in the process to sort for texture, so I have 8kb of stuff laying around in lists in my render-function, which need to get cleaned up in the end. I am on 32-Bit, so a pointer is 4bytes, which makes for a total of about 4kb I stuff into my list every frame. So, drawing doesn't really take much time on my GTX970, but I am already down to 80fps (from ~300) when I don't even enable the actual draw-call.ĭebugging and profiling got me, that one part of the problem seems to be the lists I am filling with the pointers to the objects. To get them, I have to run over a BSP-Tree and then pack them into a list, which I can then sort by texture and vertexbuffers. I have about 1000 objects with ~3 submeshes in general on screen, while there are about 17000 objects in the whole world. I have no clue how I should render those objects in a fast way. Well, they caught up so much that it is faster now to just not cull anything at all. The game originally does very much CPU-Culling, which lets it run at mostly 40fps on a modern system in the more demanding main areas, because graphic-cards weren't so strong back then. I'm currently working on replacing an old games D3D7 renderer with a more modern D3D11 one (It's Gothic 2, in case you know that game!).






Gothic 2 d3d11