ViewPortSelection in DX11

Hi,
How to achieve selective rendering per ViewPort in DX11?
Is there build in solution?
I attached DX9 shader example.
Thanks in advance for your help.

ViewPortSelection.zip (6.0 KB)

“select viewport” node will do it - I guess

ViewPortSelection.zip (7.5 KB)

Thanks.

hi DiMiX. with some reasons i can not reply you as vvvebsite message. please email me to andrey.bo[]gmail.com

One more question: how to spead meshes to individual viewports without create multiple layers?
attached is the patch where every box should appear in single viewport

ViewPortSpreading.v4p (9.9 KB)

if its spreaded you only need Validator and ViewPortIndex, no need for SelectViewPort:

Great, thanks!
@tonfilm That works for simple case - one slice per viewport.
but i need patch more complex scenario: 6 viewports, spread of 8:
viewport 0 - no slice;
viewport 1 - slice 0&1;
viewport 2 - slice 2&3;
viewport 3 - no slice;
viewport 4 - slice 4&5;
viewport 5 - slice 6&7;

then you need to do that in the shader… there is a semantic VIEWPORTINDEX that you can use to enable/disable drawing. add that to the PerDraw buffer and then use it in the vertex shader to put the geometry out of the view frustrum on your conditions so it will be discarded…

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.