Making a "flashlight"

Here is a unit-quad which is nice to use as the backing geometry for full screen effects. Save it to a file called quad.dae (collada) extension, add it a model and reference it as the mesh. When you draw it, set both view and projection to identity, and it will always cover the screen.

<?xml version="1.0" encoding="utf-8"?>

  FBX COLLADA exporter2012-10-10T12:34:45Z2012-10-10T12:34:45ZY_UP
  
    
      
    
  
  
    
      
        
          
            
              0.000000  0.000000 0.000000 1.000000
            
            
              0.000000  0.000000 0.000000 1.000000
            
            
              0.400000  0.400000 0.400000 1.000000
            
            
              0.000000  0.000000 0.000000 1.000000
            
            
              1.000000
            
          
        
      
    
  
  
    
      
        
          
-1.000000 -1.000000 0.000000
1.000000 -1.000000 0.000000
-1.000000 1.000000 0.000000
1.000000 1.000000 0.000000

          
            
              
              
              
            
          
        
        
          
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000

          
            
              
              
              
            
          
        
        
          
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000

          
            
              
              
            
          
        
        
          
          
        
        

3 3 2 2 0 0 3 3 0 0 1 1

0.010000 0.000000 0.000000 0.000000 0.000000 0.010000 0.000000 0.000000 0.000000 0.000000 0.010000 0.000000 0.000000 0.000000 0.000000 1.0000001.000000 24.0000000.0416672.000000
3 Likes