// XC_BUILTIN_INFINITE_GRID_D3D12_VS cbuffer GridConstants : register(b0) { float4x4 gViewProjectionMatrix; float4 gCameraPositionAndScale; float4 gCameraRightAndFade; float4 gCameraUpAndTanHalfFov; float4 gCameraForwardAndAspect; float4 gViewportNearFar; float4 gGridTransition; }; struct VSOutput { float4 position : SV_POSITION; }; VSOutput MainVS(uint vertexId : SV_VertexID) { static const float2 positions[3] = { float2(-1.0, -1.0), float2(-1.0, 3.0), float2( 3.0, -1.0) }; VSOutput output; output.position = float4(positions[vertexId], 0.0, 1.0); return output; }