openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] exrdisplay and fragment shaders


From: Drew Hess
Subject: [Openexr-devel] exrdisplay and fragment shaders
Date: Fri, 14 Mar 2003 01:56:04 -0800 (PST)

Thanks to Nvidia's Simon Green, exrdisplay now has support for rendering 
OpenEXR images using fragment shaders.

To build exrdisplay with fragment shader support, sync your CVS tree, grab 
the Nvidia Cg SDK (see http://developer.nvidia.com), and run configure 
like so:

  ./configure --with-nvsdk-prefix=/path/to/your/nvidia/SDK

configure will tell you if it can't find the SDK or if there's a problem 
compiling with it.

Fragment shader support only works with GPUs capable of running fp30 
profiles (e.g. the NV30) because it uses floating-point fragments.  It may 
work with the NV30 emulator in recent Nvidia drivers, but I haven't tried.

exrdisplay comes with a built-in shader that implements the standard
exrdisplay pipeline, see exrdisplay.cg.  To use it, run exrdisplay like
this:

  exrdisplay -f image.exr

You can also use your own shader without modifying exrdisplay, assuming
you use the same input parameters as the built-in shader.  This feature is
handy for playing around with Cg.  You do that by compiling your .cg
fragment shader with the Cg compiler 'cgc' (once more, see
http://developer.nvidia.com) and passing the compiled shader to exrdisplay
like so:

  exrdisplay -f foo.fp30 image.exr

See the README file in the exrdisplay directory for more details.


I've only tested this under Linux so far.  If anyone gets it working with
MacOS X, please let me know what you had to change (if anything) so that I
can update the source tree.  Making it work in Win32 with Visual C++ and
the Intel 7.0 C++ compiler should be as easy as creating a new
"exrdisplay-fragshader" project that includes a path to the Win32 version 
of the Cg SDK.  Again, if you do this, please send me the changes.


-dwh-






reply via email to

[Prev in Thread] Current Thread [Next in Thread]