Files
Seele/res/shaders/Debug.slang
T

30 lines
473 B
Plaintext
Raw Normal View History

2024-01-26 09:58:01 +01:00
import Common;
struct DebugVertex
{
float3 position;
float3 color;
};
2024-03-31 10:21:09 +02:00
struct Params
2024-01-26 09:58:01 +01:00
{
2024-03-31 10:21:09 +02:00
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;
2024-01-26 09:58:01 +01:00
}
[shader("pixel")]
2024-03-31 10:21:09 +02:00
float4 fragmentMain(in Params params) : SV_Target
2024-01-26 09:58:01 +01:00
{
2024-03-31 10:21:09 +02:00
return float4(params.color, 1);
}