markypooch

Members
  • Content count

    195
  • Joined

  • Last visited

Community Reputation

1308 Excellent

About markypooch

  • Rank
    Member

Personal Information

  • Location
    Rockford IL

Recent Profile Visitors

7531 profile views
  1. DX11

    I think, at least for D3D11, the biggest thing you can do is limiting the amount of state changes you make to the pipeline. This is usually accomplished by grouping meshes that have similar pipeline parameters. As for the QuadTree, is there perhaps a priming read you can do of the tree, get the information that you need from each node, and try to dispatch that to the GPU in one go? Obviously this will result in more app side processing of the scene, but you can than profile, and see if the end result is better. The goal is to keep the GPU busy, sending small piece meal workloads while you continually prepare the next list of commands on the CPU may result in the GPU being under-utilized The raw draw call in 11 is where a lot of things are resolved. From what I understand most of the deferred context calls are in fact deferred up to this point. So cutting those down will be a huge benefit (and of course other calls to the deferred context).
  2. This is looking better, and better. I really like the warm color pallet.
  3. The way i've done outline rendering before is to do an additional pass of the scene geometry. Enable front face culling, and in this particular pass's vertex shader you'd offset the vertice positions in the direction of the normal (making this secondary mesh layer larger). Than in the pixel shader you can keep it simple, and just return black or something. This should give you the outline you're looking for. You'll have to do additional checks, and calculations if you want the mesh the mouse is hovering above to be the only one that is outlined, like inverse ray projecting (picking). Here is the URL i've used before to implement it. It should be pretty easy to translate this from XNA to D3D. http://rbwhitaker.wikidot.com/toon-shader You can also do a sobel operation as a post-processing step to achieve an outline around your meshes. Though imho, it looks to clean for toon renders, but for selection outlining it might be perfect for you
  4. Trust me on this one. All technical books have errata. In this case I'm very much assuming the technical editor missed this. Add the '==' to that if condition, and you should see that error message box popup telling you that device creation failed.
  5. Here goes one problem if (d3ddev = NULL) { MessageBox(hwnd, "Error creating Direct3D device", "Error", MB_OK); return 0; } Use '==' to test for equivalancy. Which explains why you make it to the exception being thrown. I'm guessing this call is failing here. Make sure the values you are passing to this function are valid d3d->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3ddev);
  6. Well there are a few ways you can do this. One way is quite simply loop over the tiles performing bound tests based on the player position, and pass on the positional data stored in the player tile, and set that directly to the players pos. The other way is to just divide the pixel position of the player by the tile fixed height, and width like so x = 100 / 16 = 3 y = 100 / 16 = 3 This you can use as an index into the tilemap, or however you're storing this to get the positional data directly, and set it to the player. EDIT Ah, I misinterpreted. I thought you were looking to have player snapping to individual grid cells
  7. You could post it on Git. I always view these paste it things as just for sharing throw away code snippets, not for entire projects. In Visual Studio (I don't know what environment/IDE you're using) you can synch up with a Git repository, and commit your project, and it's directory structure. This makes it a lot easier for sharing, and even working with other devs (You can branch off the main project and work on smaller features in a way that won't destroy the build when something goes horribly wrong). I'd recommend creating an account if you haven't already: https://github.com/ I just think more people will be likely to dig through 11 source files in a nice repository than 11 separate hyperlinks.