Jump to content

  • Log In with Google      Sign In   
  • Create Account

nikitablack

Member Since 12 Apr 2010
Offline Last Active Jul 27 2016 05:59 AM

Posts I've Made

In Topic: How To Use Dx Ortho Projection Matrix

21 July 2016 - 01:59 AM

You can find a better documentation here: D3DXMatrixOrthoOffCenterLH and D3DXMatrixOrthoLH.


In Topic: How to get patch id in domain shader.

27 June 2016 - 07:58 AM

Hi Jason, it's a good solution, thank you. But if I understood you correctly, your approach is basically the same as drawing with indices. If I would have a set of points as one constant/structured buffer, I have to pass the id of a point as a vertex data, right? So, drawing the same patch multiple times will require to duplicate vertices.

And I need a unique sequential patch id for coloring entire patch. So in domain shader a could sample structured buffer of colors.

In Topic: How to get patch id in domain shader.

19 June 2016 - 06:31 AM

Thank you @MJP. That make sense. And actually documentation says that though I had to read it several times to understand.

 

@Matias is it still true if I have a pass-through vertex shader?

 

And maybe you can help me with my scenario. I have a big buffer with all control points. A have several index buffers for patches. Some patches should be drawn multiple times with different transformation. So if I want to draw everything in one call I have to duplicate indices. Right now I'm drawing each patch in it's own draw call and for patches that need to be drawn multiple times I'm using instancing. Here's a problem - for each new instance SV_PrimitiveID resets to 0. SV_InstanceID is not available in hull/domain shader and I have to pass it from vertex shader unnecessary duplicating data. Looks like instancing not works very well with tessellation.


In Topic: [D3D12] How to correctly update constant buffers in different scenarios.

15 June 2016 - 02:11 AM

Thanks guys. I understood, the waiting for the queue signal not necessary here. Thought it can be used to make sure that operation completed and release the temporary upload heap.

 

p.s.: I just realized that @iedoc is an author of amazing directx tutorials and I want to say thank you, I was followed your posts for a long time :).


In Topic: [D3D12] How to correctly update constant buffers in different scenarios.

14 June 2016 - 08:17 AM

There is no necessity in having explicit fence to wait for the copy operation from the upload to default heap to complete as long as your command lists are executed on the same command queue:

- copy from upload to default heap (cmd list 1)

- transition your copy dest constant buffer into shader read state (cmd list 2 or could be a part of cmd list 1)

- do drawing using the constant buffer (cmd list 3)

 

However, I have not seen Microsoft, AMD or Intel in their D3D12 samples following this pattern.

 

That sounds interesting. Can you please elaborate it a bit more? Why do you use 3 command lists? I don't see a problem of doing the same with only one. What do you mean by copy from upload to default - call one of the command list's copy methods? What do you mean by shader read state?


PARTNERS