• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By lubbe75
      As far as I understand there is no real random or noise function in HLSL. 
      I have a big water polygon, and I'd like to fake water wave normals in my pixel shader. I know it's not efficient and the standard way is really to use a pre-calculated noise texture, but anyway...
      Does anyone have any quick and dirty HLSL shader code that fakes water normals, and that doesn't look too repetitious? 
    • By turanszkij
      Hi,
      I finally managed to get the DX11 emulating Vulkan device working but everything is flipped vertically now because Vulkan has a different clipping space. What are the best practices out there to keep these implementation consistent? I tried using a vertically flipped viewport, and while it works on Nvidia 1050, the Vulkan debug layer is throwing error messages that this is not supported in the spec so it might not work on others. There is also the possibility to flip the clip scpace position Y coordinate before writing out with vertex shader, but that requires changing and recompiling every shader. I could also bake it into the camera projection matrices, though I want to avoid that because then I need to track down for the whole engine where I upload matrices... Any chance of an easy extension or something? If not, I will probably go with changing the vertex shaders.
    • By NikiTo
      Some people say "discard" has not a positive effect on optimization. Other people say it will at least spare the fetches of textures.
       
      if (color.A < 0.1f) { //discard; clip(-1); } // tons of reads of textures following here // and loops too
      Some people say that "discard" will only mask out the output of the pixel shader, while still evaluates all the statements after the "discard" instruction.

      MSN>
      discard: Do not output the result of the current pixel.
      clip: Discards the current pixel..
      <MSN

      As usual it is unclear, but it suggests that "clip" could discard the whole pixel(maybe stopping execution too)

      I think, that at least, because of termal and energy consuming reasons, GPU should not evaluate the statements after "discard", but some people on internet say that GPU computes the statements anyways. What I am more worried about, are the texture fetches after discard/clip.

      (what if after discard, I have an expensive branch decision that makes the approved cheap branch neighbor pixels stall for nothing? this is crazy)
    • By NikiTo
      I have a problem. My shaders are huge, in the meaning that they have lot of code inside. Many of my pixels should be completely discarded. I could use in the very beginning of the shader a comparison and discard, But as far as I understand, discard statement does not save workload at all, as it has to stale until the long huge neighbor shaders complete.
      Initially I wanted to use stencil to discard pixels before the execution flow enters the shader. Even before the GPU distributes/allocates resources for this shader, avoiding stale of pixel shaders execution flow, because initially I assumed that Depth/Stencil discards pixels before the pixel shader, but I see now that it happens inside the very last Output Merger state. It seems extremely inefficient to render that way a little mirror in a scene with big viewport. Why they've put the stencil test in the output merger anyway? Handling of Stencil is so limited compared to other resources. Does people use Stencil functionality at all for games, or they prefer discard/clip?

      Will GPU stale the pixel if I issue a discard in the very beginning of the pixel shader, or GPU will already start using the freed up resources to render another pixel?!?!



       
    • By Axiverse
      I'm wondering when upload buffers are copied into the GPU. Basically I want to pool buffers and want to know when I can reuse and write new data into the buffers.
  • Advertisement
  • Advertisement
Sign in to follow this  

DX12 [DirectX 12] Need help setting up a directx 12 project with visual studio 17

Recommended Posts

Advertisement

I think you should be looking to learn directx 11. Directx 12 does not bring anything new to the table, and in fact has *less* than directx 11 (by design). Directx 11 is going to be so much easier for you to set up and understand. I say this because it sounds like your new to directx and i'm just trying to save you some time

Share this post


Link to post
Share on other sites

I've actually already ordered this book:

https://www.amazon.com/Introduction-Programming-DirectX-Computer-Science/dp/1942270062

So, I was just trying to get my hands dirty and get ready to study the book. I mean I can't really switch now that I've already ordered the book. Also, I'm in Japan and some how the Amazon site here said that i'll get the book that I ordered the next day, whereas if I ordered the same book by the same author, just the DirectX 11 version, it'd take 2 to 3 months to ship. So I had no choice. But I'd appreciate if you told me some links or resources that explain how I set it up.

I think you should be looking to learn directx 11. Directx 12 does not bring anything new to the table, and in fact has *less* than directx 11 (by design). Directx 11 is going to be so much easier for you to set up and understand. I say this because it sounds like your new to directx and i'm just trying to save you some time

Share this post


Link to post
Share on other sites

Well, Microsoft does have the D3D12 documentation (https://msdn.microsoft.com/en-us/library/windows/desktop/dn899120(v=vs.85).aspx) which does have a run through ... though realistically I would probably wait for the book you ordered as it will likely be easier to follow.

Though I would agree on D3D12 being a bad choice for someone just starting out, its much lower level and a lot of the "automated" things in D3D11 have to be manually accounted for in D3D12. So you may feel like you are drowning with the huge amount you will be taking in to pick it up.

I would say the book you got is one I would recommend though, Frank Luna does usually do a good job of covering things (heh I learnt DirectX 9 years back through his old book, also have the DX12 one on my read list for sometime soon) 

Edited by GibbonThatCodes

Share this post


Link to post
Share on other sites

I was not a particularly big fan of this publication. I've bought all of his books since his 90C hit the shelves. My problem is from his DX11 book to his DX12 the whole thing felt hastily put together with D3D12 moreso appended to it, rather than a fresh re-write. (I think the editor even misses a few spots when changing references to D3D11 to 12 in some cliff notes O_o)

However, for someone who has never owned his previous books, I think you won't gripe as much as I did about it. Though I was quite disappointed that he didn't delve into multi-threaded design in the advanced section. He shoos it off as something you can study about on your own, which fair enough, but it felt kinda cheap.

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