Skip to content

Commit 7ea533a

Browse files
yoyofrkblaschke
authored andcommitted
Place shader "PS" function into its own line and wrap arguments for readability.
Signed-off-by: Kai Blaschke <kai.blaschke@kb-dev.net>
1 parent 5502341 commit 7ea533a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/libprojectM/MilkdropPreset/MilkdropShader.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,22 @@ void MilkdropShader::PreprocessPresetShader(std::string& program)
371371
{
372372
if (m_type == ShaderType::WarpShader)
373373
{
374-
program.replace(int(found), 11, "void PS(float4 _vDiffuse : COLOR, float4 _uv : TEXCOORD0, float2 _rad_ang : TEXCOORD1, out float4 _return_value : COLOR0, out float4 _mv_tex_coords : COLOR1)\n");
374+
program.replace(int(found), 11, R"(
375+
void PS(float4 _vDiffuse : COLOR,
376+
float4 _uv : TEXCOORD0,
377+
float2 _rad_ang : TEXCOORD1,
378+
out float4 _return_value : COLOR0,
379+
out float4 _mv_tex_coords : COLOR1)
380+
)");
375381
}
376382
else
377383
{
378-
program.replace(int(found), 11, "void PS(float4 _vDiffuse : COLOR, float2 _uv : TEXCOORD0, float2 _rad_ang : TEXCOORD1, out float4 _return_value : COLOR)\n");
384+
program.replace(int(found), 11, R"(
385+
void PS(float4 _vDiffuse : COLOR,
386+
float2 _uv : TEXCOORD0,
387+
float2 _rad_ang : TEXCOORD1,
388+
out float4 _return_value : COLOR)
389+
)");
379390
}
380391
}
381392
else

0 commit comments

Comments
 (0)