Jump to content
  • Advertisement

alisahaf70

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

115 Neutral

About alisahaf70

  • Rank
    Newbie
  1. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    thank you i think its not possible to lock and read it (hope that i think wrong)   so can i calculate depth manually with HLSL i found sth about it . can you give me some guide about this solution. is it possible in my case?   http://stackoverflow.com/questions/3946902/rendering-depth-in-hlsl   thank you again
  2. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    the error is D3DERR_INVALIDCALL   and IDirect3DDevice9::GetRenderTargetData  also crash
  3. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    any guide? please help me :(
  4. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    @Hodgman   i injected setstencil function successfully and udk call it regulary but when i want to read argument data crash accured please help me Line 4 failed to lock and after that crash accured and even D3DXSaveSurfaceToFile("AKS.PNG", D3DXIFF_PNG, pNewZStencil, nullptr, nullptr); crash too(but it works for backbuffer) HRESULT WINAPI mSetDepthStencilSurface(IDirect3DSurface9 *pNewZStencil) { SetRect(&rectToLock, 10, 10, 15, 15); if(FAILED(pNewZStencil->LockRect(&lockedRect,&rectToLock,D3DLOCK_READONLY))) { lock=false; } else { lock=true; unsigned int *pixels=(unsigned int*)lockedRect.pBits; } if(lock) { pNewZStencil->UnlockRect(); lock=false; } return oSetDepthStencilSurface(pNewZStencil); }
  5. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    some article from ue3 doc not udk(i think udk use default settings)   Rendering state defaults Since there are so many rendering states, it's not practical to set them all every time we want to draw something. Instead, UE3 has an implicit set of states which are assumed to be set to the defaults (and therefore must be restored to those defaults after they are changed), and a much smaller set of states which have to be set explicitly. The set of states that don't have implicit defaults are: RHISetDepthState RHISetBlendState RHISetRasterizerState RHISetBoundShaderState RHISetStreamSource (if applicable) All other states are assumed to be at their defaults (as defined by the relevant TStaticState, for example the default stencil state is set by RHISetStencilState(TStaticStencilState<>::GetRHI()).     can you give me some guide or refrence how can i do that? because i know a little bit about directX api   thanks i will try this but are you sure that they are using depth buffer? (i read some where that we can use depth buffer memory for other purpose how can i found that)
  6. Hi i want to simulate kinect sensor in UDK (for rescue robot) and UDK default settings disabled depth buffer of d3dx9 device and i cant turn it on because of API limitation (UDK is Close Source Game Engine) so i injected d3dx9 functions and i want to compute depth of my scene manually   is it possible to compute depth data (like z-buffer data) manually with HLSL or sth else currently i injected(beginscene ,endscene & present function of directx9)   how can i compute depth and access its data ? (any solution HLSL or sth else)   thanks a lot
  7. alisahaf70

    Depth Buffer of Injected DirectX(UDK)

    @aregee yes i think udk default settings disabled depth buffer can i turn it on after device created without any problem? (i think no )   @spazzarama i injected directX Dll and get endstate function and call getstencildepth method in endstate   so because udk default settings disabled depth buffer can i compute depth manually with HLSL or sth else?(any reference or guide)   thanks a lot 
  8. Hi (first of all sorry for my bad english :)       )  i injected my dll into udk(Close Source) and now i have access to beginstate , Endstate and also Device :D i want to read stencil buffer data but i couldn't because in udk  Device->GetDepthStencilSurface(&depthbuffer)) return error (D3DERR_NOTFOUND) but i need to read depth of scene  from UDK   is there any solution to read depth of scene it in this situation ( i think udk use depth buffer for sth else)   if not can i read or compute it with another trick like using hlsl or sth else (anythings)   thank you very much  
  • Advertisement
×

Important Information

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

GameDev.net 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!