Viewport (DX11.Layer Indexed) behaviour

This is a little weird … I’ve got a project with two viewports set up like shown in the example and use a custom normalized viewport to render elements independent of the viewports - but there’s something odd about it which I can’t seem to understand.
It looks like it’s rendered twice in the top viewport, and there’s also something interesting about the Z order if you press the toggle.

Anyone able to explain or come up with a better way to draw elements once per renderer only, independent of viewport?

ViewportDX11.v4p (10.8 KB)

Thanks

Seems to be working like this as expected …
Still I would have liked the other solution better. Anyone?

i think you can get viewport information as a sematic in the shader and enable/disable the rendering there with your custom condition.

yeah I guess so … but that would need to be added to a fair amount of shaders then, and there still would be some more drawcalls only to decide after if it’s going to be displayed or not. Hence I’d prefer to filter beforehand on the cpu!

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