Jump to content
  • Advertisement

vinterberg

Member
  • Content count

    194
  • Joined

  • Last visited

Community Reputation

1244 Excellent

About vinterberg

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Badly chosen near+far planes maybe, seems like z-fighting?
  2. vinterberg

    ball isn't spawning where desired

    It seems to me that you use newBall.transform.position without initialising it, in your SpecialShot() function?
  3. You could also add your shaders directly in your project, they will be compiled to .cso files. Then you can add a post-compiler event that copies the .cso files to your own folder, if they're found to be newer. That's what I do anyways, works great for me
  4. You're not deleting these brushes, so isn't that a huge memory leak? Probably also not the fastest way to go about it.. How about writing pixels to a buffer, and then blit it to the screen when it's done? Also, you need to take into account the player position, how else is the floor going to move with the player?
  5. Shouldn't it be column * 4 + 0..3 ?
  6. If it's just for debugging purposes, why not just render the text in white with black background or something...?
  7. vinterberg

    Making texture atlas?

    If you would like to mess about with generating atlas yourself at some point, this article helped me quite alot! http://blackpawn.com/texts/lightmaps/default.html
  8. You could do it in the vertex shader, by setting inputlayout and vertexbuffer to NULL and using SV_VertexID to know which vertex you need to calculate. You would probably need to use 6 sides * 2 triangles * 3 vertices = 36 vertices for your draw call, and if you use a static const float3[] to hold all 36 vertices of a unity cube in your vertex shader, all you need to do is scale and position them
  9. I think it does, since it will be uploaded to VRAM when you set it as resource? But maybe you could just split your workload?
  10. 1) It's okay to leave stuff bound, like cbuffers etc.. If it's not accessed by the new-bound shader, no need to unbind But of course if you need to render to a texture used as input, you need to unbind it first - and vice versa.. 2) I always do it, makes it easier to see which resource is bound to which slot! 3) IMHO It's generally best practice to only bind big resources once (not every render pass), like texture atlas and such - every time you bind a resource, it's uploaded to VRAM (that's how I understand it anyways).
  11. I do this by doing a vector using only yaw angle, like this: if (::GetAsyncKeyState('W') & 0x8000f) { FLOAT yaw = Game_World->GetCamera()->GetYaw(); FLOAT f = time_delta * 5.0f; Game_World->GetCamera()->DeltaPosition(XMVectorSet(f * (FLOAT)sin(yaw), 0, f * (FLOAT)cos(yaw), 0.0f)); } You can easily figure out how to do the other three movements by adding/subtracting 90/180 to the sin/cos angle. Edit: The reason why your method slows down is because your movement vector isn't normalized after you set y == 0.
  12. vinterberg

    Compile shaders inside of IDE

    You can add .hlsl files to your solution, and they will be compiled to .cso objects when building (remember to right-click them in the Solution Explorer and set stuff like shadertype, shaderversion, entrypoint etc.), which you can then use directly in your program using DX11Device->CreatePixelShader(...) etc.!
  13. vinterberg

    D3D11 Picking Problem

    What happens if you try this? DirectX::XMStoreFloat4x4(&mat, XMMatrixTranspose(projection_matrix)); ... DirectX::XMStoreFloat4x4(&mat, XMMatrixTranspose(inv_view));
  14. vinterberg

    FBX double sided materials

    Would it be possible to simply add "the flip-side" triangles to the model in your 3D modeler? You would have twice as many triangles for the cape, but I think it could be a not-too-hacky approach
  15. You create a pointer to a CD3DFont structure but you don't assign anything to it, so it just points to a random memory location. You should make it point to an initialised CD3DFont structure
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!