mirror of
https://github.com/AxioDL/optick.git
synced 2026-03-30 11:49:24 -07:00
44 lines
623 B
HLSL
44 lines
623 B
HLSL
cbuffer ConstantBuffer : register(b0)
|
|
{
|
|
matrix View;
|
|
matrix World;
|
|
}
|
|
|
|
struct VS_IN
|
|
{
|
|
float2 pos : POSITION;
|
|
float4 col : COLOR;
|
|
};
|
|
|
|
struct PS_IN
|
|
{
|
|
float4 pos : SV_POSITION;
|
|
float4 col : COLOR;
|
|
};
|
|
|
|
PS_IN VS( VS_IN input )
|
|
{
|
|
PS_IN output = (PS_IN)0;
|
|
|
|
float4x4 wv = mul(View, World);
|
|
|
|
output.pos = mul(wv, float4(input.pos, 0.5f, 1.0f));
|
|
output.col = input.col;
|
|
|
|
return output;
|
|
}
|
|
|
|
float4 PS( PS_IN input ) : SV_Target
|
|
{
|
|
return input.col;
|
|
}
|
|
|
|
technique10 Render
|
|
{
|
|
pass P0
|
|
{
|
|
SetGeometryShader( 0 );
|
|
SetVertexShader( CompileShader( vs_4_0, VS() ) );
|
|
SetPixelShader( CompileShader( ps_4_0, PS() ) );
|
|
}
|
|
} |