normalize rendered light color for display consistency (compiler normalizes it anyway)

lower 3d light sphere brightness to reduce occlusion
#63
This commit is contained in:
Garux
2022-12-17 02:15:38 +06:00
parent d41adc5e93
commit 88a03b07be
5 changed files with 35 additions and 17 deletions

View File

@@ -587,6 +587,16 @@ inline std::size_t vector3_min_abs_component_index( const BasicVector3<Element>&
return ( fabs( self[2] ) < fabs( self[mini] ) )? 2 : mini;
}
template<typename Element>
inline Element vector3_max_component( const BasicVector3<Element>& v ){
return ( v[0] > v[1] ) ? ( ( v[0] > v[2] ) ? v[0] : v[2] ) : ( ( v[1] > v[2] ) ? v[1] : v[2] );
}
template<typename Element>
inline Element vector3_min_component( const BasicVector3<Element>& v ){
return ( v[0] < v[1] ) ? ( ( v[0] < v[2] ) ? v[0] : v[2] ) : ( ( v[1] < v[2] ) ? v[1] : v[2] );
}