Hassanbasil

Members
  • Content count

    254
  • Joined

  • Last visited

Community Reputation

195 Neutral

About Hassanbasil

  • Rank
    Member
  1. Hello,   I've been porting my Direct3D code to Vulkan for a while now, and I found a few things rather annoying with Vulkan. What I'm trying to do is to use a single pipeline (single vertex shader) to allow rendering both animated and non-animated objects. I use two vertex buffers, one for pos/uv/norm/tang attributes and one for per-vertex animation data. The problem is that, when I make the pipeline to match my shader (which expects the second buffer to fill in some bound attributes), it crashes the driver if I don't bind the second buffer. So I tried to bind the same first vertex shader twice (data is irrelevant since I'm telling the shader not to use it via a UBO). Binding a dummy buffer works, but turns out it is very expensive (when rendering 5k+ objects, I get 50%+ performance loss). Is making two pipelines my only option? Is there a way to make it a bit more sloppy and allow incomplete input? I'm no expert in those things - but it seems like Vulkan could really just ignore filling in the attributes, since it already knows the stride of the entire vertex.     Thanks and regards, Hasan Al-Jawaheri  
  2. Dynamic Texture Array

    I'm using the texture to implement geometric clipmap based terrain. Basically, the texture is used by a Load call in the vertex shader. I thought, ignoring the "intuitive usage" of the texture, one ID3D11DeviceContext::Map for a 3D texture would be faster than a Map on a staging texture and a CopyResource. Plus it's probably using less memory.
  3. Dynamic Texture Array

      I see. Would it be more efficient (performance and memory wise) to use a 3D texture instead?
  4. Hello,   I'm trying to create a texture array that I want to update per frame. So I want to use D3D11_USAGE_DYNAMIC and ArraySize>1. but I get this error: D3D11 ERROR: ID3D11Device::CreateTexture2D: A D3D11_USAGE_DYNAMIC Resource must have ArraySize equal to 1. [ STATE_CREATION ERROR #101: CREATETEXTURE2D_INVALIDDIMENSIONS]   Why is that even a thing? Is there anything wrong with a dynamic texture array?   EDIT: I also tried 3D textures, there seems to be a minimum for the size of a row (128 in my case)? creating a 1x1x1 3D texture and then using Map gives RowPitch=128 (although format is 4 bytes per texel). Is this documented anywhere? there is not even a warning, using small textures messes up everything.   Regards, Hasan Al-Jawaheri
  5. Thanks for the reply!   Turns out some interfaces, such as ID3DDevice2, are not supported on earlier versions of windows. And so were ID2D1Factory2 and many other interfaces. I had to downgrade the interfaces to previous versions (e.g ID3DDevice1 instead of 2). I really have no clue how they relate or work but I'm fine with it, I don't think I needed them anyway.
  6. Hello!   I'm running Windows 8.1 with Visual Studio Ultimate 2013. I'm trying to deploy my Direct3D applications on older OSes, specifically Windows 8.0 or possibly Windows 7. The application does not seem to run on Windows 8.0 due to D3DCompiler_47.dll not existing. I tried including the DLLs in Windows Kits\8.1\Redist\D3D\x86\ with the application, but it does not respond to execution (nothing happens when I run).   What exactly am I missing? Is there a legitimate redistributable package for Direct3D 11/11.1?   Regards, Hasan Al-Jawaheri
  7. Terrain streaming

    Hello everyone, I'm working on a terrain engine that implements the geometry clipmaps, the thing is, i'm wondering what is the best way to build up the height/diffuse/normal maps? currently I have a separate thread reading my files to build the maps, which are only height and diffuse, then re-creating the ID3D11Texture2D every time, I have 2 copies of each map to swap between them while one is being filled, and my normal are generated in the pixel shader from the height map (taking 4 samples for each pixel). now the question is, should it be done like that? should I be calling some ID3D11Device::CreateTexture2D and their SRV's every while? would it be more efficient to have my textures dynamic and have the thread only read the file and fills in some memory then the main threads Maps and Unmaps the textures according to the read data? and how about the normal map, should it be extracted from the height map in the pixel shader or at the clipmap update? Finally, since i'm using D3D11, is the tessellated terrain a better implementation to go with? I tried a sample by NVidia by looks like it's not as fast as it should be - I had around 50 FPS with only the terrain on screen so I supposed it was disappointing. Thank you for your time, Hasan
  8. I also do some multithreaded loading and the graphics debugger crashes on it, perhaps a bug in the debugger itself, looks like it doesn't support multithreading
  9. I do have the SDK and it is what im using
  10. Hello everyone, I'm running into trouble debugging my application, when i run it, it's fine, but when i use the visual studio graphics debugger or PIX, it breaks on swap chain's present call, with the following error in VS: "Unhandled exception at 0x6249D61F (d2d1.dll) in HasX11 Engine.exe: 0xC0000005: Access violation reading location 0x00000000." and PIX gives the following: "Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention." I'm not sure what is the problem, i'm not using d2d at all, not even included, yet the error is in d2d1.dll, also - when i attach VS11 debugger for PIX it breaks on present too. I am running windows 8 consumer preview, with visual studio 11 beta, i had directX SDK june 2010 installed, is it causing conflicts? i tried to rename the install directory of the sdk to make sure it's not linking with it (since i realized windows 8 has the libs and headers built in) but with the same result, i dont really feel like uninstalling the dxsdk just to make sure since i lost its installer, could there be something else causing this? also note that it happens with both dirext3D 11 and 11.1. Thank you for your time, Hasan
  11. Environment-interactive animation

    [quote name='InvalidPointer' timestamp='1332974818' post='4926148'] It's something called inverse kinematics, and it's a fairly well-understood (if complex) problem domain. [/quote] Thank you for pointing that out, InvalidPointer ( sounds wrong, eh? [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] ), i found alot of information on it, guess that's all i needed [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img] .
  12. Hello everybody, First off I'm not really sure if this is the right board but let's hope it is [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] I'm working on animation for my engine, basically i'm planning to make 3 types: normal keyframed animation, skeletal animation (pre-defined frames of bones) and the environment-interactive skeletal animation. So basically, my API will have a set of functions responsible for moving bones depending on the environment, for example, if there's a wall on the character's right, i can call hxSkeleton::SetBoneChainTarget ( baseRightArmBone, rightHandBone, wallPosition ); so it tries to move all bones between baseRightArmBone and rightHandBone so that rightHandBone touches the "wallPosition", same thing with legs, which can give better results while moving up stairs, for example. The question is, has this been done before? where can i read more about it? would be better than starting all over from scratch, also is it practical? Is it better than pre-defined frames?
  13. Thanks for the reply i actually installed the correct driver and it did nothing, then after it, i installed an even newer beta driver and it also didn't work, the thing is, the caps seem somewhat confusing because the actual card's entry is empty, but the intel chip is not, although it has the same specs as the nVidia chip, which is somewhat weird, the intel GPU's specs SHOULD be able to run dx11 as it's listed there (see screenshot above), but it just doesn't work one more final note for anyone willing to help: running my debug/release applications from the folder itself works fine, and it runs with nVidia GPU, but running it from visual studio or PIX won't work, and that's the whole thing
  14. thank you for the link, i figured out all the points he concluded there, though, after using IDXGIFactory1, now it enumerates both adapters, but only the intel HD adapter has available outputs, the caps viewer is looking weird also..here's a screenshot (second NVIDIA card is selected below) [img]http://img196.imageshack.us/img196/7449/captureomw.jpg[/img] both cards has the same names there, but clicking them shows this: first one: description says intel HD graphics, dsecond one: description says nVidia geforce 540M but the second one, which is supposed to be the good GPU, has only "outputs" listed under it and it cannot be expanded, meaning there are no outputs, which is the problem, now another thing is, the first one, which is described as intel HD graphics, has DirectX11 listed in it, and it supports feature level 11, so im a little bit confused
  15. [quote name='iedoc' timestamp='1328337812' post='4909445'] change your battery mode to high performance [/quote] It is on high performance already