Gradient background fps drop
              in 
             Programming Questions 
              •  
              3 months ago    
            
 
           
             Hi. 
            
 
            
           
             I want to make a gradient background. I want the program for android. 
            
            
             But it drops from the default 60 fps to 21 fps. 
             
              
             
             
              
               
              
              
            
 
           
              how can i make it easier for the program so it don't drop that hard. I don't mind if the solution is alittle worse graphic
             
             
               i also tried to put an image of the same gardient, as background it helped alittle was down to 35fps.
               
               
                
                 
                
                
                 
                
                
                 
                  
                 
                 
                
                 
                
                
                 
                
                
                 
                
               
              
             
                 So i just ask if theres a better way than this: 
                
                
                  void setup(){
                 
                 
                   size(960,540); 
                 
                 
                  }
                 
                 
                   void draw(){
                 
                 
                       for (int i = 0; i <= height; i++) {
                 
                 
                        float inter = map(i, 0, height, 0, 1);
                 
                 
                        color c = lerpColor(color(196,254,255),color(0,58,254) , inter);
                 
                 
                        stroke(c);
                 
                 
                        line(0, i, width, i);
                 
                 
                      }
                 
                 
                      println(frameRate);
                 
                 
                      }
                 
                 
              
              1  
            
 
            
 
 
          