Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

256 Neutral

About Xeile

  • Rank
  1. Xeile

    Depth Buffer Driving me Crazy

    Without the code how you create your depth buffer and the code how you use your depth buffer no one will be able to help you Abeltherock007.
  2. Xeile

    dx11 and screen coordinates

    To my knowledge clipspace bounds are the same to all versions of DirectX. Top-Left: (-1, +1) Top-Right: (+1, +1) Bot-Left: (-1, -1) Bot-Right: (+1, -1) If I would draw a fullscreen quad I would store these 4 coordinates into a (vertex) buffer, use triangle stripe primitive topology, use BACK or NONE triangle facing and use a clockwise winding order. Without transforming the 4 coordinates it should yield the same result on all DirectX versions. Are you sure you perform all the steps correctly?
  3. Hmmm, the fast path explanation does sounds logical from a hardware manufacturer POV. Thanks guys.
  4. Hello, Hobbying away on my project I decided to use compute shaders for the operations I would normally use a fullscreen quad render for. I am writing a deferred renderer using 6 graphic buffers. For now I clear the graphic buffers with the following compute shader: //---------------------------------------- // Variables //---------------------------------------- RWTexture2D<float2> RT_Ambient : register(u0); RWTexture2D<float4> RT_Color : register(u1); RWTexture2D<float2> RT_Depth : register(u2); RWTexture2D<float4> RT_Emissive : register(u3); RWTexture2D<float4> RT_Final : register(u4); RWTexture2D<float4> RT_Normal : register(u5); RWTexture2D<float4> RT_Specular : register(u6); //---------------------------------------- // Shaders //---------------------------------------- [numthreads(32, 32, 1)] void CS ( uint3 index : SV_DispatchThreadID ) { RT_Ambient [index.xy] = float2(1.0, 1.0); RT_Color [index.xy] = float4(0.0, 0.0, 0.0, 0.0); RT_Depth [index.xy] = float2(1.0, 1.0); RT_Emissive [index.xy] = float4(0.0, 0.0, 0.0, 0.0); RT_Final [index.xy] = float4(0.0, 0.0, 0.0, 1.0); RT_Normal [index.xy] = float4(0.5, 0.5, 0.5, 0.0); RT_Specular [index.xy] = float4(0.0, 0.0, 0.0, 0.0); } RT_Final is the swapchain here. As you can see, this involves binding 7 view to the device context and also 7 writes. My other two options are using the ordinary fullscreen quads and writing a value to each bound render target or using ID3D11DeviceContext::ClearUnorderedAccessViewFloat method. What is the cheapest method to use or how do I determine what is the cheapest method?
  5. Xeile

    Game Engine and a Game for AI studies

    Have you considered the Unreal engine? It has been written in C++ although you need to buy a license to have access to the code. If you download the evaluation version, you can use it aswell and write Unreal-code to create your own mod. Unreal-script has many similarities to Java and if you are familiar with the C++ syntax, you should be able to pick Unreal-script very fast. I used the Unreal engine a few years ago for displaying an AI pathfinding implementation as part of a school assignment, which I completed having little knowledge about the engine.
  6. Quote:Original post by DieterVW... The only semantics that have special meaning in HLSL are those starting with SV_*. All other Semantics are user defined with user defined meaning. Which means that the semantics questioned above are specific to the samples and have no special directx meaning... Ah, I wasn't aware of this, I assumed they did had some DX9 legacy meaning or something similar (but that would make sense of course). I haven't tried omitting the semantic yet to see if it compiles... Another but related topic, regarding the Input Assembler: When you create a new ID3D11InputLayout instance and you pass along an array of D3D11_INPUT_ELEMENT_DESC, you still are required to fill in SemanticName field in each instance of D3D11_INPUT_ELEMENT_DESC in the array. But I don't really understand why this still is necessary. As long as you specify the format and the aligned byte offset the runtime can handle the rest doesn't it, or has it only to do with the ability to pass down matrices?
  7. You talk about game state manager being a well defined singular concept, but it is not. It is still open for interpretation of what the actual responsibilities are of your game state manager. There are quite a few resources available, but they range from tetris clones to unreal like engines and both are only remotely the same at a very high design level. You can ask the lead programmer of Blizzard Entertainment and of Unreal Technologies what their game state manager does, but I assure you will get different answer from both. What you first need to do is define what you want to achieve with your system and the come back and start with asking more specific questions. Sorry I cannot give you a simple yes or no answer, but your questions aren't simple, rather open.
  8. Hello folks, I was wondering if people are in the same boat here. I am hobbying a bit with the DirectX 11 SDK and I found the lack of proper documentation regarding the Shader Model 5 annoying. Microsoft included a few new semantics with SM 5.0, without including them in the documentation. They included a tutorial how to create and design the Hull and Domain stage, but that is about it. So far you can guess the use of these new semantics, but what they exactly mean is unclear. You can see the samples using semantics like BEZIERPOS and WORLDPOS, without describing what they do. Am I missing something here? All in all I get the feeling that the HLSL syntax is getting bloated and is losing its 'organized' feeling. Kind regards, Xeile
  9. Assuming the alpha component isn't of interest of your emissive channel you could use CIE 1931 instead of (s)RGB. CIE 1932
  10. In cases like this, I take a step back and come up with a plan to make it work for a very specific case. I place my camera at a fixed point the beginning of the scene, same as the object and in your case the light. On paper you can calculate the world position of each frustrum corner in world space and you use these for your lightning pass. You then render the scene again with stuff like this hard-coded you can check if you have done the rest correctly. Next step is to bring back the calculation of the frustrum corners and validate the result. Working step by step is the most efficient way of debugging your application, keep it simple at first then work your way back.
  11. First off, without even knowing what goes wrong, one thing that sprong into my mind, you didn't supply us the code that shows how you update your constant buffers (specifically the cbPerObject). I believe your first mistake could be that your forgot to transpose/invert the 3 matrices before storing them in the buffer which you use to update your constant buffer variable. This could go right, it could go wrong. We surely cannot tell, because you didn't really told us what is wrong with your application in the first place. General advice I want to give you, when you don't get the behavior you were hoping for, start up PIX and debug the GPU side of the story, it really makes your live that much simpler. If you haven't worked with PIX yet you better get started and you will win back your time later on.
  12. Xeile

    SkyBox camera arcball

    The world matrix is complete independent of the camera, its only the View matrix you want to update here. So leave World matrix as it is and recalculate the cameraPosition each frame. // Angle is the rotation in radian which the camera needs to rotate each frame. // Keep it small if you want to rotate slowly Matrix rotationMatrix = Matrix.CreateRotateAxis(Vector3.Up, angle); cameraPosition = Vector3.TransformCoordinate(rotationMatrix, cameraPosition); view = Matrix.CreateLookAt(cameraPosition, cameraTarget, Vector3.Up);
  13. Hello everyone, I ran into a minor issue with my littl' hobby project. Shader Model 5 seems to support a new render state command SetRenderTargets. As you might know these render state sets just call the according ID3D11DeviceContext method. It was there where I ran into an issue. I could succesfully set a single render target (and depth stencil) within HLSL, however, whenever I tried multiple render targets it failed. There seems to be some confusion which of the two methods, ID3D11DeviceContext::OMSetRenderTargets or ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews, should be called. According to PIX (failing to record a specific D3D call) it turns out that the latter of the two method is called, even though I don't use any unordered access views. Has anyone run into this issue aswell, I find it exceedingly difficult to find any documentation about this. Kind regards, Xeile
  14. Xeile

    D3D10 Orthographic view

    I believe your trouble is caused by supplying the wrong values with that function call, though I am not 100% sure of this. Have you tried passing a 1.0 as width and the inversed aspect ratio as height? Aside from this issue, have you considered not using a View and Projection matrix? If the UI is always on top of your 3D world and has no fancy depth stuff, you can probably get away with using clip-space or an transformed clip-space (using the world transformation to mimic the effect of your UI space having a (0,0) to (width,height) rectangle opposed to the (-1,1)(1,-1) clip-space).
  15. Xeile

    depth buffer cull

    The technique is uniformal over DX10, DX11 and even OpenGL, the API call names may be vary though. 1) I don't know any particular tutorials, but using the stencil buffer isn't all that different from using the depth buffer. Perhaps this helps you on your way: Stencil Buffer Techniques (Direct3D 9) 2) The steps I mentioned in my pseudocode are fast. Drawing your Sphere 2 is faster than drawing Sphere 1, since 2 doesn't use an expensive pixel shader.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!