• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Jiraya
      For a 2D game, does using a float2 for position increases performance in any way?
      I know that in the end the vertex shader will have to return a float4 anyway, but does using a float2 decreases the amount of data that will have to be sent from the CPU to the GPU?
       
    • By ucfchuck
      I am feeding in 16 bit unsigned integer data to process in a compute shader and i need to get a standard deviation.
      So I read in a series of samples and push them into float arrays
      float vals1[9], vals2[9], vals3[9], vals4[9]; int x = 0,y=0; for ( x = 0; x < 3; x++) { for (y = 0; y < 3; y++) { vals1[3 * x + y] = (float) (asuint(Input1[threadID.xy + int2(x - 1, y - 1)].x)); vals2[3 * x + y] = (float) (asuint(Input2[threadID.xy + int2(x - 1, y - 1)].x)); vals3[3 * x + y] = (float) (asuint(Input3[threadID.xy + int2(x - 1, y - 1)].x)); vals4[3 * x + y] = (float) (asuint(Input4[threadID.xy + int2(x - 1, y - 1)].x)); } } I can send these values out directly and the data is as expected

                             
      Output1[threadID.xy] = (uint) (vals1[4] ); Output2[threadID.xy] = (uint) (vals2[4] ); Output3[threadID.xy] = (uint) (vals3[4] ); Output4[threadID.xy] = (uint) (vals4[4] ); however if i do anything to that data it is destroyed.
      If i add a
      vals1[4] = vals1[4]/2; 
      or a
      vals1[4] = vals[1]-vals[4];
      the data is gone and everything comes back 0.
       
       
      How does one go about converting a uint to a float and performing operations on it and then converting back to a rounded uint?
    • By fs1
      I have been trying to see how the ID3DInclude, and how its methods Open and Close work.
      I would like to add a custom path for the D3DCompile function to search for some of my includes.
      I have not found any working example. Could someone point me on how to implement these functions? I would like D3DCompile to look at a custom C:\Folder path for some of the include files.
      Thanks
    • By stale
      I'm continuing to learn more about terrain rendering, and so far I've managed to load in a heightmap and render it as a tessellated wireframe (following Frank Luna's DX11 book). However, I'm getting some really weird behavior where a large section of the wireframe is being rendered with a yellow color, even though my pixel shader is hard coded to output white. 

      The parts of the mesh that are discolored changes as well, as pictured below (mesh is being clipped by far plane).

      Here is my pixel shader. As mentioned, I simply hard code it to output white:
      float PS(DOUT pin) : SV_Target { return float4(1.0f, 1.0f, 1.0f, 1.0f); } I'm completely lost on what could be causing this, so any help in the right direction would be greatly appreciated. If I can help by providing more information please let me know.
    • By evelyn4you
      Hello,
      i try to implement voxel cone tracing in my game engine.
      I have read many publications about this, but some crucial portions are still not clear to me.
      At first step i try to emplement the easiest "poor mans" method
      a.  my test scene "Sponza Atrium" is voxelized completetly in a static voxel grid 128^3 ( structured buffer contains albedo)
      b. i dont care about "conservative rasterization" and dont use any sparse voxel access structure
      c. every voxel does have the same color for every side ( top, bottom, front .. )
      d.  one directional light injects light to the voxels ( another stuctured buffer )
      I will try to say what i think is correct ( please correct me )
      GI lighting a given vertecie  in a ideal method
      A.  we would shoot many ( e.g. 1000 ) rays in the half hemisphere which is oriented according to the normal of that vertecie
      B.  we would take into account every occluder ( which is very much work load) and sample the color from the hit point.
      C. according to the angle between ray and the vertecie normal we would weigth ( cosin ) the color and sum up all samples and devide by the count of rays
      Voxel GI lighting
      In priciple we want to do the same thing with our voxel structure.
      Even if we would know where the correct hit points of the vertecie are we would have the task to calculate the weighted sum of many voxels.
      Saving time for weighted summing up of colors of each voxel
      To save the time for weighted summing up of colors of each voxel we build bricks or clusters.
      Every 8 neigbour voxels make a "cluster voxel" of level 1, ( this is done recursively for many levels ).
      The color of a side of a "cluster voxel" is the average of the colors of the four containing voxels sides with the same orientation.

      After having done this we can sample the far away parts just by sampling the coresponding "cluster voxel with the coresponding level" and get the summed up color.
      Actually this process is done be mip mapping a texture that contains the colors of the voxels which places the color of the neighbouring voxels also near by in the texture.
      Cone tracing, howto ??
      Here my understanding is confus ?? How is the voxel structure efficiently traced.
      I simply cannot understand how the occlusion problem is fastly solved so that we know which single voxel or "cluster voxel" of which level we have to sample.
      Supposed,  i am in a dark room that is filled with many boxes of different kind of sizes an i have a pocket lamp e.g. with a pyramid formed light cone
      - i would see some single voxels near or far
      - i would also see many different kind of boxes "clustered voxels" of different sizes which are partly occluded
      How do i make a weighted sum of this ligting area ??
      e.g. if i want to sample a "clustered voxel level 4" i have to take into account how much per cent of the area of this "clustered voxel" is occluded.
      Please be patient with me, i really try to understand but maybe i need some more explanation than others
      best regards evelyn
       
       
  • Advertisement
  • Advertisement
Sign in to follow this  

DX11 No visualizations at first when using DirectX SDK

Recommended Posts

I tried to run some of RasterTek's DirectX 11 tutorials using the obsolete DirectX SDK (June 2010). When I run these tutorials (as-is) my screen becomes completely black on my notebook (i.e. so no visualizations). My notebook also seems unresponsive for a few seconds while pushing CTRL+ALT+DELETE. Finally, CTRL+ALT+DELETE works and after re-clicking the application icon (so that it has focus again), the application and visualizations work fine.

Any ideas why this does not work out of the box?

Edited by matt77hias

Share this post


Link to post
Share on other sites
Advertisement

Could be a problem with your laptop. You mean you get this problem when you run any executable provided by rastertek tutorials only? Did you compile that executable yourself or you downloaded it from the website?

Share this post


Link to post
Share on other sites

Could be a problem with your laptop. You mean you get this problem when you run any executable provided by rastertek tutorials only? Did you compile that executable yourself or you downloaded it from the website?

 

Tried an exe. Works fine.

My own compiled exe's seem not to work. I only updated the platform while importing the solution in Visual Studio 2017 and added the Include/Libs to the DXSDK.

Share this post


Link to post
Share on other sites
added the Include/Libs to the DXSDK

Probably that's your problem. Visual Studio comes with DirectX since a few years ago. Mixing them together is just asking for trouble.

Also, are you sure it's not simply compiling shaders / loading data? 

Edited by Zaoshi Kaba

Share this post


Link to post
Share on other sites
Probably that's your problem. Visual Studio comes with DirectX since a few years ago. Mixing them together is just asking for trouble.

 

I have no issues running my own programs using Direct3D 11 and the obsolete DirectX 9 SDK. I never used the obsolete DirectX 11 SDK before, so RasterTek's tutorials are the first ones I tried.

I do not see why "Mixing them together is just asking for trouble" since it is only a matter of including and linking libs in Visual Studio. Besides Direct3D 11 seems rather a subset of the full DirectX 11 SDK.

Edited by matt77hias

Share this post


Link to post
Share on other sites

The installation of DXSDK_Jun10 returned a failure code, but I presume this is due to the deprecation policy of Microsoft. Besides all the content seems to be present and in the right directories (even the environment variable is set).

Share this post


Link to post
Share on other sites
Probably that's your problem. Visual Studio comes with DirectX since a few years ago.

Yeah spot on.

I had similar issues setting up a DX project recently. By default your VS project properties probably have the following include and lib directories:

  • c:\Program Files (x86)\Windows Kits\[some version]\Include\
  • c:\Program Files (x86)\Windows Kits\[some version]\lib\winv6.3\x64

Or something similar, I think there are around three Include directories and a couple of lib directories. This is where the current version of DirectX is kept and your project is probably linking against these instead of the June 2010 SDK.

To prevent this from happening, under your project's Include & Lib directories you can uncheck the 'Inherit from parent or project defaults' checkbox. Note that you'll probably still need to explicitly include $(VC_IncludePath), and have $(VC_LibraryPath_x64) for your libs... it's the Windows SDK stuff you want to avoid.

Hope that helps!

Edited by Orangeatang

Share this post


Link to post
Share on other sites
Or something similar, I think there are around three Include directories and a couple of lib directories. So this is where the latest version of DirectX is kept so you project is probably linking against these instead of the June 2010 SDK.

 

Removed all the SDK paths under VC++ directories. But what is now the alternative for windows.h?

Edited by matt77hias

Share this post


Link to post
Share on other sites

Ah you probably still need the following include directory:

  • c:\Program Files (x86)\Windows Kits\8.1\Include\um\

Since that's where Windows.h, you really just want to make sure that you're including and linking against the June 2010 SDK and not the Windows Kit SDK for DirectX.

Share this post


Link to post
Share on other sites
Since that's where Windows.h, you really just want to make sure that you're including and linking against the June 2010 SDK and not the Windows Kit SDK for DirectX.

I needed to add a few more, but now it compiles again :)

  • Executable Directories: $(VC_ExecutablePath_x86);$(VS_ExecutablePath);C:\Program Files (x86)\Windows Kits\8.1\bin\x86;$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);
  • Include Directories: $(DXSDK_DIR)Include;$(VC_IncludePath);C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\shared
  • Library Directories: $(DXSDK_DIR)Lib\x86\;$(VC_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86

Unfortunately, the result is pretty much the same. (I think the order matters, so if you place DXSDK first, there will be no conflict with the Windows SDK)

My .sln can be found here: https://www.dropbox.com/s/zzscgq9oxcbz74u/Engine.zip?dl=0

Edited by matt77hias

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement