mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-18 04:26:49 +00:00
Don't generate potentially unsupported vertex formats to ignore W
* When using VS In we want to ignore the W component, but that already happens explicitly for vulkan/GL in the shader. Mirror that same solution to D3D instead of trying to force a 3-component format which may not be supported (e.g. on AMD R16G16B16_*)
This commit is contained in:
@@ -102,6 +102,8 @@ cbuffer MeshVertexCBuffer REG(b0)
|
||||
row_major float4x4 ModelViewProj;
|
||||
|
||||
float2 SpriteSize;
|
||||
|
||||
uint homogenousInput;
|
||||
};
|
||||
|
||||
cbuffer MeshGeometryCBuffer REG(b0)
|
||||
|
||||
@@ -44,7 +44,14 @@ meshV2F RENDERDOC_MeshVS(meshA2V IN, uint vid : SV_VertexID)
|
||||
float2 psprite[4] = {float2(-1.0f, -1.0f), float2(-1.0f, 1.0f), float2(1.0f, -1.0f),
|
||||
float2(1.0f, 1.0f)};
|
||||
|
||||
OUT.pos = mul(IN.pos, ModelViewProj);
|
||||
float4 pos = IN.pos;
|
||||
|
||||
if(homogenousInput == 0u)
|
||||
{
|
||||
pos = float4(pos.xyz, 1);
|
||||
}
|
||||
|
||||
OUT.pos = mul(pos, ModelViewProj);
|
||||
OUT.pos.xy += SpriteSize.xy * 0.01f * psprite[vid % 4] * OUT.pos.w;
|
||||
OUT.norm = float3(0, 0, 1);
|
||||
OUT.secondary = IN.secondary;
|
||||
|
||||
Reference in New Issue
Block a user