power_play/src/pp/pp_vis/pp_vis_gpu.gh
2026-01-22 03:47:58 -06:00

74 lines
1.5 KiB
Plaintext

////////////////////////////////////////////////////////////
//~ Quad shader types
Struct(V_DQuadPSInput)
{
Semantic(Vec4, sv_position);
Semantic(nointerpolation u32, quad_idx);
};
Struct(V_DQuadPSOutput)
{
Semantic(Vec4, sv_target0);
};
////////////////////////////////////////////////////////////
//~ Shape shader types
Struct(V_DVertPSInput)
{
Semantic(Vec4, sv_position);
Semantic(Vec4, color_lin);
};
Struct(V_DVertPSOutput)
{
Semantic(Vec4, sv_target0);
};
////////////////////////////////////////////////////////////
//~ Overlay shader types
Struct(V_OverlayPSInput)
{
Semantic(Vec4, sv_position);
};
Struct(V_OverlayPSOutput)
{
Semantic(Vec4, sv_target0);
};
////////////////////////////////////////////////////////////
//~ Helpers
f32 V_RandFromPos(Vec3 pos);
Vec4 V_DryColor(Vec4 color, f32 dryness);
////////////////////////////////////////////////////////////
//~ Shaders
//- Utility shaders
ComputeShader2D(V_ClearCellsCS, 8, 8);
ComputeShader(V_ClearParticlesCS, 64);
//- Backdrop
ComputeShader2D(V_BackdropCS, 8, 8);
//- Quads
VertexShader(V_DQuadVS, V_DQuadPSInput);
PixelShader(V_DQuadPS, V_DQuadPSOutput, V_DQuadPSInput input);
//- Particle simulation
ComputeShader(V_EmitParticlesCS, 64);
ComputeShader(V_SimParticlesCS, 64);
//- Shapes
VertexShader(V_DVertVS, V_DVertPSInput);
PixelShader(V_DVertPS, V_DVertPSOutput, V_DVertPSInput input);
//- Overlay
VertexShader(V_OverlayVS, V_OverlayPSInput);
PixelShader(V_OverlayPS, V_OverlayPSOutput, V_OverlayPSInput input);