Code cleanup, refactoring and simplification
This commit is contained in:
parent
0888d1c9b0
commit
47c3bd16c4
16 changed files with 500 additions and 901 deletions
|
|
@ -9,7 +9,7 @@ struct VSInput
|
|||
struct Instance
|
||||
{
|
||||
float4x4 model;
|
||||
float4 arrayIndex;
|
||||
float arrayIndex;
|
||||
};
|
||||
|
||||
struct UBO
|
||||
|
|
@ -30,7 +30,7 @@ struct VSOutput
|
|||
VSOutput main(VSInput input, uint InstanceIndex : SV_InstanceID)
|
||||
{
|
||||
VSOutput output = (VSOutput)0;
|
||||
output.UV = float3(input.UV, ubo.instance[InstanceIndex].arrayIndex.x);
|
||||
output.UV = float3(input.UV, ubo.instance[InstanceIndex].arrayIndex);
|
||||
float4x4 modelView = mul(ubo.view, ubo.instance[InstanceIndex].model);
|
||||
output.Pos = mul(ubo.projection, mul(modelView, float4(input.Pos, 1.0)));
|
||||
return output;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue