Squallc

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

128 Neutral

About Squallc

  • Rank
    Member
  1. Hello, I want to render a sky in background of all my geometry. So I tried to set viewport MinZ and MaxZ to 1 (like it says in DirectX SDK documentation) but I still have geometry behind like if z was not to 1. If I change my vertex shader by changing z position to w it works. Any idea why it does works with the viewport ? Thanks
  2. intermittent E_FAIL upon Present()

    Try to put DirectX Runtime in debug and watch output for error/warning message from DirectX. Thanks to Evil Steve for this post on his blog ;)
  3. Cascaded shadow problem

    Does the sample from shaderx 7 work on your Nvidia 8400 gs video card ?
  4. Hi Crytek describes a technique in this paper : http://developer.amd.com/assets/D3DTutorial_Crytek.pdf In Vertex Shader you create a ray by using coordinate and inverse viewproj matrice. Something like: float3 start = float3(input.uv, 0.f) * InvViewProj; ouput.ray = start - ViewPos; ouput.ray.Normalize(); or float3 start = float3(input.uv, 0.f) * InvViewProj; float3 end = float3(input.uv, 1.f) * InvViewProj; ouput.ray = end - start; ouput.ray.Normalize(); In pixel shader you just have to do : float depth = tex2D(...); //the depth need to be the distance between the camera and the objet in linear (not like in the Depth buffer) float3 pos = input.ray * depth; I never did it but I think it's something like that good luck
  5. DirectX lock index buffer - problem

    You should turn on the directx debug info (http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=300672&reply_id=3123284) and fix your code if the are any error/warning.
  6. Hi Quote:Original post by lollan -How can I select what to render with a scene graph. There is many ways to do it. The node of your graph can be a struct with a type and an union. A node can be an abstract class of object to render and a transformation node and you do the difference with a dynamic cast. Quote:Original post by lollan-Why is it efficient exactly ? Octree is efficient because with one test you can avoid to render 1/8 th of the space. Quote:Original post by lollan-Regardless of the difficulty, what should I use if my only concern is effency and all shader base operation are handle by the mesh, itself? If it's a really very small demo perhaps you can just use a linked list ? But any way I think that octree works fine.
  7. Quote:Original post by Evil Steve Can you make up a minimal sample problem that shows this behaviour? Is that the only ERROR line in the debug spew? Is your app windowed or fullscreen? Are you passing a HWND to Present(), or just NULL? Are you absolutely sure the HWND is valid? I will try to make a small example this week end but I think it will has a lot of code. Yes I only have this error. My app is in windowed but there is the same problem in fullscreen. I call Present with NULL (Present (NULL, NULL, NULL, NULL)). How do you check if the HWND is valid ? (I test if it is not NULL after the call of CreateWindowEx). EDIT : I refactored my terrain engine and it seems that the problem has disapeared [Edited by - Squallc on July 21, 2008 2:47:39 PM]
  8. After some bugs fixed I still have this kind of warning : Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 18 Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 19 Any idea of how to suppress these warnings ? I am using a shader which apply a texture and I never call SetSamplerState. I still have my "Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present" problem. All Win32 call succeed.
  9. this link can be useful http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=316777&reply_id=2747161
  10. Thanks, I going to search what is exactly my problem. I will working with maximum debug level now. EDIT: I already click on all google link about this error but there is no solution. I have the same message : Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present
  11. Hi, I am doing 3D engine to learn about DirectX. Sometime my Present call returns an unknown error (value : 0x88760879). Does someone had already had this error ?
  12. Game Engine problem

    Quote:Original post by nirVaan vb->Render(0,TRIANGLELIST,0); This seem bizarre to me. What do the two zero mean ?
  13. Quote:Original post by PdG No.. if the planet has coordinate x,y,z, the world should be x00,0y0,00z, right? No a translation the matrix is 100X 010Y 001Z 0001 Quote:Original post by PdG coords.d3dCoords is the directx coordinates of the planet. Did you mean that these coordantes has been transformed by the world matrix of this planete ?
  14. The world matrix of the planet is the identity ?
  15. there is a method called SetFloatArray ( http://msdn.microsoft.com/en-us/library/bb205717(VS.85).aspx )