MAGIC Magic Mailing List
 
 

From: Jeff Solomon (jsolomon AT vlsi DOT stanford.edu)
Date: Mon Feb 18 2002 - 15:28:02 EST

  • Next message: R. Timothy Edwards: "Jeff Solomon's Future of Magic"

    Awhile ago, when I first tried Tim's OGL magic version on my Sun, the
    window looked really washed out. I thought that either it was supposed
    to look that way or that there was a bug in Tim's code or OGL itself.
    
    After lots of investigation, it turns out that some Sun hardware
    supports visuals that are either gamma-corrected or not. Turns out
    that Tim's code was using one of these gamma-corrected visuals through
    not fault of his own.
    
    If you want to see how bad this looks. On linux, bring up a magic
    design (either OGL or X11) and type:
    
        xgamma -g 2.2
    
    This will set the gamma to 2.2, which is the standard gamma for
    gamma-corrected Sun visuals. To turn it back off, type:
    
        xgamma -g 1.0
    
    On a Sun, you can set the gamma value similarly with "fbconfig -g".
    
    This brings up a few issues.
    
    1) The magic color maps are designed for non-gamma corrected displays. 
       In some sense this is bad since it means we're not getting a linear
       intensity response for our colors. Since magic is all about colors
       (unlike a text editor), it might be better in the long run to
       create a colormap that is gamma-corrected.
    
    2) There are a few ways around the "washed out" problem. The first is
       to have Sun specific code (see XSolarisGetVisualGamma(3)) to detect
       that a visual is gamma-corrected and ask for one that isn't.
    
       Another thing we could do is add a "gamma" command which would
       raise each color to the 1/gamma power so that when it was drawn to
       the screen (and raised to the gamma power) it would look the same
       as if no gamma-correction had taken place.
    
       We could also have both of these things.
    
    Has anyone else ever seen this "washed out" phenomenon? Does anybody
    have any thoughts on this?
    
    Jeff
    


  •  
     
    Questions? Contact Rajit Manohar
    cornell logo