| 643 | } |
| 644 | |
| 645 | void MapDrawerSoft::DoFullscreenPostprocess( const MapState& map_state ) |
| 646 | { |
| 647 | // Fullscreen blend. |
| 648 | m_Vec3 blend_color; |
| 649 | float blend_alpha; |
| 650 | map_state.GetFullscreenBlend( blend_color, blend_alpha ); |
| 651 | if( blend_alpha > 0.001f ) |
| 652 | { |
| 653 | unsigned char blend_color_i[3]; |
| 654 | unsigned char blend_alpha_i; |
| 655 | for( unsigned int j= 0u; j < 3u; j++ ) |
| 656 | { |
| 657 | int c= static_cast<int>( std::round( 255.0f * blend_color.ToArr()[j] ) ); |
| 658 | if( c < 0 ) c= 0; |
| 659 | if( c > 255 ) c= 255; |
| 660 | blend_color_i[ rendering_context_.color_indeces_rgba[j] ]= c; |
| 661 | } |
| 662 | |
| 663 | blend_alpha_i= std::max( 0, std::min( 255, static_cast<int>( std::round( blend_alpha * 255.0f ) ) ) ); |
| 664 | rasterizer_.DrawFullscreenBlend( blend_color_i, blend_alpha_i ); |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | void MapDrawerSoft::DrawMapRelatedModels( |
| 669 | const MapRelatedModel* const models, const unsigned int model_count, |
nothing calls this directly
no test coverage detected