Skip to content

Commit

Permalink
Tweak previous render_view RGB work
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Nov 22, 2024
1 parent 0df139b commit 6b736e2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
3 changes: 0 additions & 3 deletions source_files/edge/r_colormap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,6 @@ class ColormapShader : public AbstractShader
{
RendererVertex *dest = glvert + v_idx;

dest->rgba_color[0] *= render_view_red_multiplier;
dest->rgba_color[1] *= render_view_green_multiplier;
dest->rgba_color[2] *= render_view_blue_multiplier;
dest->rgba_color[3] = alpha;

HMM_Vec3 lit_pos;
Expand Down
30 changes: 15 additions & 15 deletions source_files/edge/r_render.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,15 +549,15 @@ static void WallCoordFunc(void *d, int v_idx, HMM_Vec3 *pos, float *rgb, HMM_Vec

if (swirl_pass > 1)
{
rgb[0] = 1.0 / data->R;
rgb[1] = 1.0 / data->G;
rgb[2] = 1.0 / data->B;
rgb[0] = 1.0 / data->R * render_view_red_multiplier;
rgb[1] = 1.0 / data->G * render_view_green_multiplier;
rgb[2] = 1.0 / data->B * render_view_blue_multiplier;
}
else
{
rgb[0] = data->R;
rgb[1] = data->G;
rgb[2] = data->B;
rgb[0] = data->R * render_view_red_multiplier;
rgb[1] = data->G * render_view_green_multiplier;
rgb[2] = data->B * render_view_blue_multiplier;
}

float along;
Expand Down Expand Up @@ -619,15 +619,15 @@ static void PlaneCoordFunc(void *d, int v_idx, HMM_Vec3 *pos, float *rgb, HMM_Ve

if (swirl_pass > 1)
{
rgb[0] = 1.0 / data->R;
rgb[1] = 1.0 / data->G;
rgb[2] = 1.0 / data->B;
rgb[0] = 1.0 / data->R * render_view_red_multiplier;
rgb[1] = 1.0 / data->G * render_view_green_multiplier;
rgb[2] = 1.0 / data->B * render_view_blue_multiplier;
}
else
{
rgb[0] = data->R;
rgb[1] = data->G;
rgb[2] = data->B;
rgb[0] = data->R * render_view_red_multiplier;
rgb[1] = data->G * render_view_green_multiplier;
rgb[2] = data->B * render_view_blue_multiplier;
}

HMM_Vec2 rxy = {{(data->tx0 + pos->X), (data->ty0 + pos->Y)}};
Expand Down Expand Up @@ -1695,9 +1695,9 @@ static void FloodCoordFunc(void *d, int v_idx, HMM_Vec3 *pos, float *rgb, HMM_Ve
*pos = data->vertices[v_idx];
*normal = data->normal;

rgb[0] = data->R;
rgb[1] = data->G;
rgb[2] = data->B;
rgb[0] = data->R * render_view_red_multiplier;
rgb[1] = data->G * render_view_green_multiplier;
rgb[2] = data->B * render_view_blue_multiplier;

float along = (view_z - data->plane_h) / (view_z - pos->Z);

Expand Down
12 changes: 6 additions & 6 deletions source_files/edge/r_shader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ class dynlight_shader_c : public AbstractShader

float ity = exp(-5.44 * dist * dist);

dest->rgba_color[0] = R * ity * render_view_red_multiplier;
dest->rgba_color[1] = G * ity * render_view_green_multiplier;
dest->rgba_color[2] = B * ity * render_view_blue_multiplier;
dest->rgba_color[0] = R * ity;
dest->rgba_color[1] = G * ity;
dest->rgba_color[2] = B * ity;
dest->rgba_color[3] = alpha;
}

Expand Down Expand Up @@ -540,9 +540,9 @@ class plane_glow_c : public AbstractShader

TexCoord(&dest->texture_coordinates[1], WhatRadius(DL), sec, &lit_pos, &dest->normal);

dest->rgba_color[0] = R * render_view_red_multiplier;
dest->rgba_color[1] = G * render_view_green_multiplier;
dest->rgba_color[2] = B * render_view_blue_multiplier;
dest->rgba_color[0] = R;
dest->rgba_color[1] = G;
dest->rgba_color[2] = B;
dest->rgba_color[3] = alpha;
}

Expand Down

0 comments on commit 6b736e2

Please sign in to comment.