Added HLSL shaders for order independent transparency sample

This commit is contained in:
Sascha Willems 2020-08-21 13:37:05 +02:00
parent 38ba5e6f3e
commit fbc3526c58
8 changed files with 168 additions and 0 deletions

View file

@ -0,0 +1,34 @@
// Copyright 2020 Sascha Willems
struct VSInput
{
[[vk::location(0)]] float4 Pos : POSITION0;
};
struct RenderPassUBO
{
float4x4 projection;
float4x4 view;
};
cbuffer renderPassUBO : register(b0) { RenderPassUBO renderPassUBO; }
struct ObjectUBO
{
float4x4 model;
float4 color;
};
cbuffer objectUBO : register(b1) { ObjectUBO objectUBO; }
struct VSOutput
{
float4 Pos : SV_POSITION;
};
VSOutput main(VSInput input)
{
VSOutput output = (VSOutput)0;
output.Pos = mul(renderPassUBO.projection, mul(renderPassUBO.view, mul(objectUBO.model, input.Pos)));
return output;
}