Jump to content
  • Advertisement

vinterberg

Member
  • Content count

    190
  • Joined

  • Last visited

Community Reputation

1242 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. Shouldn't it be column * 4 + 0..3 ?
  2. If it's just for debugging purposes, why not just render the text in white with black background or something...?
  3. 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
  4. 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
  5. 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?
  6. 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).
  7. 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.
  8. 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.!
  9. vinterberg

    D3D11 Picking Problem

    What happens if you try this? DirectX::XMStoreFloat4x4(&mat, XMMatrixTranspose(projection_matrix)); ... DirectX::XMStoreFloat4x4(&mat, XMMatrixTranspose(inv_view));
  10. 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
  11. 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
  12. What about doing a raycast check between previous -> current frame position? Like, testing bounding spheres against the line section between prev->cur position etc
  13. Why do you divide by distance? I assume m_fS is the interpolation value to go from startpos to endpos, so you should just do: l_transform->m_MotionInfo->m_fS += (l_transform->m_MotionInfo->m_fSpeed * m_fElapsedTime);
  14. I use this: https://github.com/Microsoft/DirectXTex
  15. Maybe this article would help? https://mtnphil.wordpress.com/2011/09/22/terrain-engine/ I'm thinking specifically the last part, "Additional optimizations" ...?
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!