Skip to content

Commit

Permalink
Revert scanlines/lighting on HUD
Browse files Browse the repository at this point in the history
  • Loading branch information
rherriman committed Jan 19, 2024
1 parent 6e32afc commit 47418eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rsrc/shaders/hud_frag.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 330 core

in vec4 gl_FragCoord;
// in vec4 gl_FragCoord;
in vec4 fragmentColor;
in vec3 fragmentNormal;

Expand Down Expand Up @@ -34,9 +34,6 @@ vec4 light_color() {

void main() {
color = light_color();
color[0] = color[0] * hudAlpha * ((int(gl_FragCoord.y) % 4) / 2);
color[1] = color[1] * hudAlpha * ((int(gl_FragCoord.y) % 4) / 2);
color[2] = color[2] * hudAlpha * ((int(gl_FragCoord.y) % 4) / 2);
color[3] = color[3] * hudAlpha * ((int(gl_FragCoord.y) % 4) / 2);
color[3] *= hudAlpha;
}

2 changes: 2 additions & 0 deletions src/game/CAbstractPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ void CAbstractPlayer::PlaceHUDParts() {
CScaledBSP* CAbstractPlayer::DashboardPart(uint16_t id, Fixed scale) {
CScaledBSP* bsp = new CScaledBSP(scale, id, this, 0);
bsp->ReplaceAllColors(ColorManager::getHUDColor());
bsp->privateAmbient = FIX1;
bsp->ignoreDirectionalLights = true;
bsp->isTransparent = true;
gRenderer->AddHUDPart(bsp);
return bsp;
Expand Down

0 comments on commit 47418eb

Please sign in to comment.