File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ class BasicColor
281
281
data_[ 3 ] = v;
282
282
}
283
283
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
285
285
{
286
286
float f = float ( v ) / float ( component_max );
287
287
f = convertFromSRGB ( f, accurate );
Original file line number Diff line number Diff line change @@ -3009,8 +3009,7 @@ const RenderCommand *Poly2dCommand::ExecuteSelf( ) const
3009
3009
tess.verts [ tess.numVertexes ].texCoords [ 0 ] = verts[ i ].st [ 0 ];
3010
3010
tess.verts [ tess.numVertexes ].texCoords [ 1 ] = verts[ i ].st [ 1 ];
3011
3011
3012
- Color::Color color = Color::Adapt ( verts[ i ].modulate );
3013
- color.Clamp ();
3012
+ Color::Color32Bit color = Color::Adapt ( verts[ i ].modulate );
3014
3013
color = tr.convertColorFromSRGB ( color );
3015
3014
tess.verts [ tess.numVertexes ].color = color;
3016
3015
@@ -3070,8 +3069,7 @@ const RenderCommand *Poly2dIndexedCommand::ExecuteSelf( ) const
3070
3069
tess.verts [ tess.numVertexes ].texCoords [ 0 ] = verts[ i ].st [ 0 ];
3071
3070
tess.verts [ tess.numVertexes ].texCoords [ 1 ] = verts[ i ].st [ 1 ];
3072
3071
3073
- Color::Color color = Color::Adapt ( verts[ i ].modulate );
3074
- color.Clamp ();
3072
+ Color::Color32Bit color = Color::Adapt ( verts[ i ].modulate );
3075
3073
color = tr.convertColorFromSRGB ( color );
3076
3074
tess.verts [ tess.numVertexes ].color = color;
3077
3075
Original file line number Diff line number Diff line change @@ -662,8 +662,7 @@ static void Tess_SurfacePolychain( srfPoly_t *p )
662
662
{
663
663
VectorCopy (p->verts [i].xyz , tess.verts [tess.numVertexes + i].xyz );
664
664
665
- Color::Color color = Color::Adapt ( p->verts [ i ].modulate );
666
- color.Clamp ();
665
+ Color::Color32Bit color = Color::Adapt ( p->verts [ i ].modulate );
667
666
color = tr.convertColorFromSRGB ( color );
668
667
tess.verts [tess.numVertexes + i].color = color;
669
668
@@ -735,8 +734,7 @@ static void Tess_SurfacePolychain( srfPoly_t *p )
735
734
736
735
VectorCopy (p->verts [i].xyz , tess.verts [tess.numVertexes + i].xyz );
737
736
738
- Color::Color color = Color::Adapt ( p->verts [ i ].modulate );
739
- color.Clamp ();
737
+ Color::Color32Bit color = Color::Adapt ( p->verts [ i ].modulate );
740
738
color = tr.convertColorFromSRGB ( color );
741
739
tess.verts [tess.numVertexes + i].color = color;
742
740
You can’t perform that action at this time.
0 commit comments