Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Mar 2006
Offline Last Active Apr 07 2015 08:28 AM

#5165092 Building Assimp in Visual Studio

Posted by on 06 July 2014 - 12:38 PM

Just for future reference if anyone else has the same question.... I downloaded CMake and followed the instructions here:



And to my surprise it actually worked. By worked I mean that it generates Solution\Project files for the versions of Visual Studio you select (As well as different target platforms, such as x86 or x64) and they build just fine.


The solution\project files it generates are a good starting point, and it builds, but they're a bit of a mess as they use absolute full paths instead of solution relative directories etc, but it's only a minute of 2's work to tidy that up.




#5017423 Error Creating Debug Device

Posted by on 04 January 2013 - 06:20 AM

Another tool to try is Depends.exe and tell it to profile your game. It'll then list all the DLLs loaded (Which tree of which DLLs loaded them).


Here is the output on mine:



Interestingly you can see that D3D11.dll tries to dynamically load D3D11SDKLayers.dll twice. The first time it tries to load if from my games directory, and fails (See the yellow circle with a question mark in it). The second time it loads it successfully from the SysWOW64 directory.


Try this with your app and see whether D3D11.dll is even trying to load the layers DLL and if it is where is it looking and failing.




#5017417 Error Creating Debug Device

Posted by on 04 January 2013 - 06:00 AM

Can you check if you have D3D11SDKLayers.dll on your system. On my system I found it in the System32 and SysWOW64 directories, as well as in \Microsoft DirectX SDK (June 2010)\Developer Runtime\x86 and \Microsoft DirectX SDK (June 2010)\Developer Runtime\x64 directories.


Also when you run your app use something like SysInternals Process Explorer to see if the D3D11SDKLayers.dll is being loaded.


For example, when I run my game in Debug mode I can see from Process Explorer that the DLL is being loaded, and specifically I can see its the one from the SysWOW64 directory:





#5017010 Error Creating Debug Device

Posted by on 03 January 2013 - 02:09 AM

The debug layer is not installed by default, you only get it if you install the developer runtime. You normally get the developer runtime though if you install the DirectX SDK or the Windows 8 SDK (Which now contains the DirectX SDK).


What OS are you on?


See this link: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476881.aspx


It states: "Note  For Windows 8, to create a device that supports the debug layer, install the Windows Software Development Kit (SDK) for Windows 8 to get D3D11_1SDKLayers.dll."


Are you using a full version of Visual Studio, or an Express version?


Maybe you need to download the Windows 8 SDK separately and install that.




#5011781 Emulating a HLSL Sample Operation on the CPU

Posted by on 17 December 2012 - 11:51 AM

Ah ha, got it!

I should be dividing by 255 on the CPU side when normalizing to the 0..1 range (Or multiplying by 255 on the GPU side when denormalizing back to 8 bits)... not by 256 as I had been doing!

One of those stupid time consuming silly mistakes!

Thanks for your help

#5003491 Rendering Normals (For Debugging) using the Geometry Shader

Posted by on 23 November 2012 - 07:49 AM

Thanks both,

Yes I'll try the colour idea first, although it'll still be a little difficult to visualize that a triangle of a certain colour represents a normal is a certain direction, but it could still be very useful.

I'll go on to implementing the geometry shader version second and I'll post the code on here for anyone that wants it.


#5002339 What does the HLSL printf function do?

Posted by on 19 November 2012 - 08:05 AM

I see from the MSDN HLSL reference that there is a printf function in HLSL:


However the description of "Submits a custom shader message to the information queue." doesn't really explain what it does. What is the Information Queue.

It also includes the remark "This operation does nothing on devices that do not support it.".

So, what does it do (On devices that do support it)?

Obviously it can't output a message for every invocation as pixel shaders are exeuted millions of times a second (Typically).

I thought maybe it outputs something but only when stepping through the code in a debugger, so I tried that...

Compiling a shader with a printf in the code succeeds and it runs fine (But with the printf not doing anything obvious), but if I try to debug it (In Visual Studio 2012) the debugger crashes immediately (i.e. long before it ever actually gets to execute the printf line).

Any idea? Just curious.


#4998415 Understanding Buffer, Texture, and Sampler "registers"

Posted by on 07 November 2012 - 08:26 AM

Good questions Tim, and ones I would like to know the answers to too.

Have you tried defining 2 constant buffers with the same register on the HLSL side?
My guess would be that you can, and then so long as you only set one of them from the C++ side and then only use one of them on your shader side you should be fine.

For example, imagine your game is a car racing game. In your code you might draw the roads first and then the cars in a separate Draw call.

So, when you draw the roads you could have a RoadParams specific constant buffer assigned to B0 and then set the appropriate Pixel Shader etc.

Once complete you could then assign a completely different CarParams constant buffer to B0, and set a different Pixel Shader (One that uses these params and draws car pixels instead of road pixels).

I'd imagine that should work fine, but I've not tried it.


#4986340 Frame Statistics

Posted by on 03 October 2012 - 04:43 AM

I know DirectX provides some basic profiling capabilities as explained in here:


However, I was wondering if there was actually a way to access more detailed stats, such as:
  • the total number of triangles drawn,
  • the total number of texels rendered
  • Percentage overdraw (Texels that are drawn and then subsequently drawn over again)
  • Total number of Vertices passed through the vertex shaders
  • Total number of Pixels passed through the pixel shader
  • etc.
I suspect the answer is that its either not possible, or that the information is available but only through hardware specific utilities or APIs.


#4971790 What is splatting?

Posted by on 21 August 2012 - 05:59 AM

Despite reading lots of game programming books over the year I've yet to see exactly what "splatting" means, as in "texture splatting" or "shader splatting". Everyone seems to assume that we all know what it means, but obviously I missed something somewhere.

I see lots of discussions etc that mention it, but nothing that actually says what it is. Is it another name for something else?

Does it mean applying a texture decal over some geometry or something like that?

Thanks in advance

#4967649 Movement on a planets surface

Posted by on 09 August 2012 - 12:50 AM

Thanks again alvaro, I'vegot a much better understanding of what I need to do now, thanks.