Skip to content

Commit 326be13

Browse files
committed
half
1 parent 0bb7adf commit 326be13

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/engine/client/cl_scrn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void SCR_DrawConsoleFontUnichar( float x, float y, int ch )
113113
{
114114
glyphInfo_t *glyph = Glyph( ch );
115115
float yadj = glyph->top;
116-
float xadj = ( SCR_ConsoleFontUnicharWidth( ch ) - glyph->xSkip ) / 2.0;
116+
float xadj = ( SCR_ConsoleFontUnicharWidth( ch ) - glyph->xSkip ) * 0.5f;
117117

118118
re.DrawStretchPic( x + xadj, y - yadj, glyph->imageWidth, glyph->imageHeight,
119119
glyph->s, glyph->t,

src/engine/renderer/glsl_source/skybox_fp.glsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ DECLARE_OUTPUT(vec4)
4343

4444
// Parametric cloud function used by quake 3 skybox code
4545
float ComputeCloudParametric( vec3 skyVec, float radiusWorld, float cloudHeight ) {
46-
return (1.0 / 2.0 * dot( skyVec, skyVec ) ) * ( -2.0 * skyVec.z * radiusWorld
47-
+ 2.0 * sqrt( skyVec.z * skyVec.z * radiusWorld * radiusWorld
48-
+ 2.0 * skyVec.x * skyVec.x * radiusWorld * cloudHeight
49-
+ skyVec.x * skyVec.x * cloudHeight * cloudHeight + 2.0 * skyVec.y * skyVec.y * radiusWorld * cloudHeight
46+
return (0.5f * dot( skyVec, skyVec ) ) * ( -2.0f * skyVec.z * radiusWorld
47+
+ 2.0f * sqrt( skyVec.z * skyVec.z * radiusWorld * radiusWorld
48+
+ 2.0f * skyVec.x * skyVec.x * radiusWorld * cloudHeight
49+
+ skyVec.x * skyVec.x * cloudHeight * cloudHeight + 2.0f * skyVec.y * skyVec.y * radiusWorld * cloudHeight
5050
+ skyVec.y * skyVec.y * cloudHeight * cloudHeight
51-
+ 2.0 * skyVec.z * skyVec.z * radiusWorld * cloudHeight + skyVec.z * skyVec.z * cloudHeight * cloudHeight ) );
51+
+ 2.0f * skyVec.z * skyVec.z * radiusWorld * cloudHeight + skyVec.z * skyVec.z * cloudHeight * cloudHeight ) );
5252
}
5353

5454
void main()

src/engine/renderer/tr_video.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,10 @@ static void blitVQQuad32fs( roqVideo_t &video, const std::vector<byte> &file )
339339

340340
static void ROQ_GenYUVTables()
341341
{
342-
float t_ub = ( 1.77200f / 2.0f ) * ( float )( 1 << 6 ) + 0.5f;
343-
float t_vr = ( 1.40200f / 2.0f ) * ( float )( 1 << 6 ) + 0.5f;
344-
float t_ug = ( 0.34414f / 2.0f ) * ( float )( 1 << 6 ) + 0.5f;
345-
float t_vg = ( 0.71414f / 2.0f ) * ( float )( 1 << 6 ) + 0.5f;
342+
float t_ub = ( 1.77200f * 0.5f ) * ( float )( 1 << 6 ) + 0.5f;
343+
float t_vr = ( 1.40200f * 0.5f ) * ( float )( 1 << 6 ) + 0.5f;
344+
float t_ug = ( 0.34414f * 0.5f ) * ( float )( 1 << 6 ) + 0.5f;
345+
float t_vg = ( 0.71414f * 0.5f ) * ( float )( 1 << 6 ) + 0.5f;
346346

347347
for ( int i = 0; i < 256; i++ )
348348
{

0 commit comments

Comments
 (0)