Skip to content

Commit 1c181ef

Browse files
committed
fixup: fixup
1 parent 2ccbd21 commit 1c181ef

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/common/Color.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class BasicColor
281281
data_[ 3 ] = v;
282282
}
283283

284-
CONSTEXPR_FUNCTION_RELAXED component_type ConvertFromSRGB( component_type v, bool accurate = true ) NOEXCEPT
284+
CONSTEXPR_FUNCTION_RELAXED static component_type ConvertFromSRGB( component_type v, bool accurate = true ) NOEXCEPT
285285
{
286286
float f = float( v ) / float( component_max );
287287
f = convertFromSRGB( f, accurate );

src/engine/renderer/tr_backend.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,8 +3009,7 @@ const RenderCommand *Poly2dCommand::ExecuteSelf( ) const
30093009
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = verts[ i ].st[ 0 ];
30103010
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = verts[ i ].st[ 1 ];
30113011

3012-
Color::Color color = Color::Adapt( verts[ i ].modulate );
3013-
color.Clamp();
3012+
Color::Color32Bit color = Color::Adapt( verts[ i ].modulate );
30143013
color = tr.convertColorFromSRGB( color );
30153014
tess.verts[ tess.numVertexes ].color = color;
30163015

@@ -3070,8 +3069,7 @@ const RenderCommand *Poly2dIndexedCommand::ExecuteSelf( ) const
30703069
tess.verts[ tess.numVertexes ].texCoords[ 0 ] = verts[ i ].st[ 0 ];
30713070
tess.verts[ tess.numVertexes ].texCoords[ 1 ] = verts[ i ].st[ 1 ];
30723071

3073-
Color::Color color = Color::Adapt( verts[ i ].modulate );
3074-
color.Clamp();
3072+
Color::Color32Bit color = Color::Adapt( verts[ i ].modulate );
30753073
color = tr.convertColorFromSRGB( color );
30763074
tess.verts[ tess.numVertexes ].color = color;
30773075

src/engine/renderer/tr_surface.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,7 @@ static void Tess_SurfacePolychain( srfPoly_t *p )
662662
{
663663
VectorCopy(p->verts[i].xyz, tess.verts[tess.numVertexes + i].xyz);
664664

665-
Color::Color color = Color::Adapt( p->verts[ i ].modulate );
666-
color.Clamp();
665+
Color::Color32Bit color = Color::Adapt( p->verts[ i ].modulate );
667666
color = tr.convertColorFromSRGB( color );
668667
tess.verts[tess.numVertexes + i].color = color;
669668

@@ -735,8 +734,7 @@ static void Tess_SurfacePolychain( srfPoly_t *p )
735734

736735
VectorCopy(p->verts[i].xyz, tess.verts[tess.numVertexes + i].xyz);
737736

738-
Color::Color color = Color::Adapt( p->verts[ i ].modulate );
739-
color.Clamp();
737+
Color::Color32Bit color = Color::Adapt( p->verts[ i ].modulate );
740738
color = tr.convertColorFromSRGB( color );
741739
tess.verts[tess.numVertexes + i].color = color;
742740

0 commit comments

Comments
 (0)