Oh, thank you, I see the difference now. The .Net DeviceCaps does not have these two:
Yes, sorry about that. Fixed here. Please add the following at the end of the C# struct
/// <summary>Indicates whether the device clip space depth values range from 0 to 1</summary>
[MarshalAs(UnmanagedType.U1)]
public bool DepthRangeZeroToOne;
/// <summary>Whether the device clip space Y values are inverted (increase from top (-1) to bottom (1))</summary>
[MarshalAs(UnmanagedType.U1)]
public bool ClipSpaceYInverted;
And another question about those matrices - does Noesis keep the same viewport matrix in between BeginOnscreenRender() and BeginOnscreenRender() for all batches?
i.e. can I always expect it to be a transformation from View dimensions to NDC or can it be something else too?
The projection matrix takes your from view space to NDC. The viewport matrix (I assume here what you set in
vkCmdSetViewport) must bet set accordingly:
- In the offscreen phase, this must be set in RenderDevice.SetRenderTarget to the dimensions of the surface.
- In the onscreen phase, this must be set by you and must be same dimensions as you set in the view (with SetSize)
I hope this makes everything clearer.