mirror of
https://github.com/rt64/rt64.git
synced 2025-04-25 03:02:33 +00:00
Co-authored-by: Isaac Marovitz <isaacryu@icloud.com> Co-authored-by: tanmaysachan <tnmysachan@gmail.com> Co-authored-by: Dario <dariosamo@gmail.com>
21 lines
472 B
HLSL
21 lines
472 B
HLSL
//
|
|
// RT64
|
|
//
|
|
|
|
struct Constants {
|
|
float4 colorAdd;
|
|
uint textureIndex;
|
|
};
|
|
|
|
[[vk::push_constant]] ConstantBuffer<Constants> gConstants : register(b0);
|
|
|
|
float4 PSMain(in float4 pos : SV_Position, in float2 uv : TEXCOORD0) : SV_TARGET {
|
|
float4 gradientColor = float4(uv, 1.0f, 0.5f);
|
|
|
|
// Check if colorAdd has any non-zero components
|
|
if (length(gConstants.colorAdd) > 0.001f) {
|
|
return gConstants.colorAdd;
|
|
}
|
|
|
|
return gradientColor;
|
|
} |