Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/engine/renderer/tr_local.h b/src/engine/renderer/tr_local.h
- index 67991bdb8..6702044e5 100644
- --- a/src/engine/renderer/tr_local.h
- +++ b/src/engine/renderer/tr_local.h
- @@ -137,6 +137,11 @@ static inline float halfToFloat( int16_t in ) {
- fi.ui = (((unsigned int)in & 0x8000) << 16) | (((unsigned int)in & 0x7fff) << 13);
- return fi.f * scale;
- }
- +static inline void halfToFloat( const f16vec2_t in, vec2_t out )
- +{
- + out[ 0 ] = halfToFloat( in[ 0 ] );
- + out[ 1 ] = halfToFloat( in[ 1 ] );
- +}
- static inline void halfToFloat( const f16vec4_t in, vec4_t out )
- {
- out[ 0 ] = halfToFloat( in[ 0 ] );
- diff --git a/src/engine/renderer/tr_main.cpp b/src/engine/renderer/tr_main.cpp
- index 6ab0c901a..0f4411d12 100644
- --- a/src/engine/renderer/tr_main.cpp
- +++ b/src/engine/renderer/tr_main.cpp
- @@ -106,12 +106,9 @@ void R_CalcTangents( vec3_t tangent, vec3_t binormal,
- {
- vec2_t t0f, t1f, t2f;
- - t0f[ 0 ] = halfToFloat( t0[ 0 ] );
- - t0f[ 1 ] = halfToFloat( t0[ 1 ] );
- - t1f[ 0 ] = halfToFloat( t1[ 0 ] );
- - t1f[ 1 ] = halfToFloat( t1[ 1 ] );
- - t2f[ 0 ] = halfToFloat( t2[ 0 ] );
- - t2f[ 1 ] = halfToFloat( t2[ 1 ] );
- + t0f = halfToFloat( t0 );
- + t1f = halfToFloat( t1 );
- + t2f = halfToFloat( t2 );
- vec3_t dpx, dpy;
- vec2_t dtx, dty;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement