Advertisement Jump to content
  • Advertisement
  • entries
  • comments
  • views


Sign in to follow this  


I didn't get as much time in yesterday as I would have liked, because I was helping to deal with a constipated eighteen-month old. Fun times were had by none.

Last evening, though, I finally managed to solve the last real problem I was having with geometry instancing. Helpful tip: If you're sending a matrix through a vertex buffer, the hlsl variable should be declared as row_major float4x4. Why DirectX and hlsl don't default to the same matrix format is beyond me. (Actually, it says in the docs that hlsl defaults to column-major format for optimization purposes, but still...) So, I spent about an hour double checking my code before I came across the row_major type modifier in a sample application and decided to look it up. I couldn't find anywhere in the docs that said to use it in such a case, but that's what the sample did, and it worked for me :D

I was only testing the code using one instance per draw call, so I'm still calling Draw ~1600 times per frame. Still, since I'm not updating the world matrix per object, it's already running much smoother. Once I refactor it a bit I should be able to get it down to a single call for the maze. Then I'll be happy enough to move on to the rest of the game.

This doesn't really show anything about the instancing, but screenshots are fun, and DWN suggested the entire map should be visible for strategic purposes. I miss the maze looming in darkness, but I do like the new fade:
Dramatic angle of the maze
Dramatic angle of the maze

I need to add more visuals soon; I'm running out of dramatic angles!

Oh, and the kid finally pooped, so all is well again in the yckx household.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!