Files
Seele/res/shaders/Debug.slang
T
2024-10-01 16:56:04 +02:00

30 lines
493 B
Plaintext

import Common;
struct DebugVertex
{
float3 position : POSITION;
float3 color : COLOR0;
};
struct Params
{
float4 pos: SV_Position;
float3 color: COLOR0;
}
[shader("vertex")]
Params vertexMain(
DebugVertex vert
){
Params result;
result.pos = mul(pViewParams.projectionMatrix, mul(pViewParams.viewMatrix, float4(vert.position, 1)));
result.color = vert.color;
return result;
}
[shader("pixel")]
float4 fragmentMain(in Params params) : SV_Target
{
return float4(params.color, 1);
}