@@ -2753,10 +2753,13 @@ impl GlesFrame<'_> {
27532753
27542754 /// Render a pixel shader into the current target at a given `dest`-region.
27552755 #[ profiling:: function]
2756+ #[ allow( clippy:: too_many_arguments) ]
27562757 pub fn render_pixel_shader_to (
27572758 & mut self ,
27582759 pixel_shader : & GlesPixelProgram ,
2760+ src : Rectangle < f64 , BufferCoord > ,
27592761 dest : Rectangle < i32 , Physical > ,
2762+ size : Size < i32 , BufferCoord > ,
27602763 damage : Option < & [ Rectangle < i32 , Physical > ] > ,
27612764 alpha : f32 ,
27622765 additional_uniforms : & [ Uniform < ' _ > ] ,
@@ -2810,15 +2813,10 @@ impl GlesFrame<'_> {
28102813 }
28112814
28122815 let mut matrix = Matrix3 :: < f32 > :: identity ( ) ;
2813- let mut tex_matrix = Matrix3 :: < f32 > :: identity ( ) ;
2816+ let tex_matrix = build_texture_mat ( src , dest , size , Transform :: Normal ) ;
28142817
28152818 // dest position and scale
28162819 matrix = matrix * Matrix3 :: from_translation ( Vector2 :: new ( dest. loc . x as f32 , dest. loc . y as f32 ) ) ;
2817- tex_matrix = tex_matrix
2818- * Matrix3 :: from_nonuniform_scale (
2819- ( 1.0f64 / dest. size . w as f64 ) as f32 ,
2820- ( 1.0f64 / dest. size . h as f64 ) as f32 ,
2821- ) ;
28222820
28232821 //apply output transformation
28242822 matrix = self . current_projection * matrix;
@@ -2836,7 +2834,7 @@ impl GlesFrame<'_> {
28362834
28372835 gl. UniformMatrix3fv ( program. uniform_matrix , 1 , ffi:: FALSE , matrix. as_ptr ( ) ) ;
28382836 gl. UniformMatrix3fv ( program. uniform_tex_matrix , 1 , ffi:: FALSE , tex_matrix. as_ptr ( ) ) ;
2839- gl. Uniform2f ( program. uniform_size , dest . size . w as f32 , dest . size . h as f32 ) ;
2837+ gl. Uniform2f ( program. uniform_size , size. w as f32 , size. h as f32 ) ;
28402838 gl. Uniform1f ( program. uniform_alpha , alpha) ;
28412839 let tint = if self . renderer . debug_flags . contains ( DebugFlags :: TINT ) {
28422840 1.0f32
0 commit comments