Skip to content

Commit

Permalink
make range render mode work with radial layout
Browse files Browse the repository at this point in the history
  • Loading branch information
phandasm committed Sep 2, 2023
1 parent 9ca0834 commit ffd7b5e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions data/gradient.effect
Expand Up @@ -124,3 +124,12 @@ technique RadialGradient
pixel_shader = PSGradient(vert_in);
}
}

technique RadialRange
{
pass
{
vertex_shader = VSRadial(vert_in);
pixel_shader = PSRange(vert_in);
}
}
9 changes: 8 additions & 1 deletion src/source.cpp
Expand Up @@ -1608,7 +1608,14 @@ gs_technique_t *WAVSource::get_shader_tech()
{
const char *techname;
if(m_radial)
techname = (m_render_mode == RenderMode::GRADIENT) ? "RadialGradient" : "Radial";
{
if(m_render_mode == RenderMode::GRADIENT)
techname = "RadialGradient";
else if(m_render_mode == RenderMode::RANGE)
techname = "RadialRange";
else
techname = "Radial";
}
else if(m_render_mode == RenderMode::GRADIENT)
techname = "Gradient";
else if(m_render_mode == RenderMode::RANGE)
Expand Down

0 comments on commit ffd7b5e

Please sign in to comment.