More Hacking at the Draw Routines

Published April 25, 2011
Advertisement
I've been trying to improve the rendering code lately. I've reworked it so all the meshes are now [font="Lucida Console"]ID3D10Mesh[/font]es. This lets me approach everything more uniformly and lets me streamline the drawing code. I haven't been able to figure out how to use [font="Lucida Console"]ID3D10Mesh::DrawSubsetInstanced[/font] yet, but I haven't spent a whole lot of time with it. Right now I'm just extracting the buffers and calling [font="Lucida Console"]ID3D10Device::DrawIndexedInstanced[/font]. It's working well enough for the moment.

I had been pushing the maze and the pellets to the GPU as points, and expanding them in geometry shaders. Converting everything to [font="Lucida Console"]ID3D10Mesh[/font]es meant I had to move away from this approach for the time being. I actually achieved a significant increase in my framerate due to finding a badly written loop in the pellet rendering code that was iterating far more than it should have been. I still think that pushing the maze and pellets as points would be faster now that the loop is corrected, but I should probably approach those as particle systems, which is a game element I've yet to implement.

Finally, I've been toying a bit with the maze shader. If I remember, I showed an image in an early post which showed how the maze shader broke at the corners. This has bugged me since the very beginning of this project. I'm now using a completely different shader that feels a little Tron to me, which is cool, but not what I want. I'm going to need to implement a volumetric shader to get the look I have for it in my head, which is also new territory for me. I understand the theory of it quite well, but implementing it is a bit more complicated, and it doesn't help that my prime coding time tends to be late at night, with the resultant cognitive dissonance of ignored weariness.

So, yeah, I'm still working at it. No visuals this time, since the rendering code is still half dismantled. Once I get it put back together, and have some visually noticeable progress, I'll let you all know.
Previous Entry Hard Drive Oddness
Next Entry Fixing the Text
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement