4d Gamma Ramps

Mike Muuss mike at BRL.MIL
Sun Feb 26 09:28:32 AEST 1989


A few weeks ago, I was shown the program /usr/sbin/gamma,
which can be used (at least on the GT and Personal Iris machines)
to set a gamma correction factor for the overall screen output
of the Iris.  It is downstream from the regular 12-->24 bit color map,
and is downstream of the screen pixels in RGB mode.  I suspect that
this gamma correction factor is being applied very close to the
DACs, at the nether end of the Graphics Pipeline.

The default gamma that is applied is 2.4

Imagine my consternation when I got my GTX machine and looked at a few
already gamma-corrected images on it -- they were much too bright,
and looked washed out.

For a variety of reasons, I would like to be able to use this capability
from some of my own programs.  It does not seem to be documented in
the places I looked online, I didn't mount a big search through the
printed manuals, so I run the risk of looking foolish when someone
says RTFM, page 42.  So be it.

On the assumption that /usr/sbin/gamma and the mechanism it exploits
are *not* documented, I went hunting, and discovered some things:

There is VERY INTERESTING system call named "sgigsc()", to exploit
SGI graphics sys-calls.

One of the undocumented functions that this system call implements is
suspiciously named SGGR1_GAMMARAMP in <sys/sgigsc.h>.

I may try a few experiments to try to figure it out;  in the meantime,
I certainly would appreciate it if someone could send me a code fragment
to load Gamma ramps that are non-standard.

	Thanks!
	 -Mike



More information about the Comp.sys.sgi mailing list