Re: [info-performer] Re: Shadow-mapping with OpenGL Performer

Date view Thread view Subject view Author view

From: faculaganymede (faculaganymede++at++yahoo.com)
Date: 01/27/2005 11:57:28


Frank,

Thank you for your reply. I've tried projective.cxx,
it doesn't seem to work on my PC (with Radeon 9800
Pro). Although the program ran with no error/warning
messages on missing hardware support, the output image
is not correct. As you can see in the attached
snapshot image, there is a huge shadow (projected gray
polygon) that's not suppose to be there.

--- Frank Hartman <Frank.Hartman++at++jpl.nasa.gov> wrote:

> faculaganymede,
>
> Not sure what your setup is but we have had good
> luck shadow mapping on our NVidia cards under RH
> Linux. I think we just copied from projective.c but
> here is our shadow setup code:
>
>
--------------------------------------------------------------------
> Shared->Sun = new pfLightSource();
> Shared->Sun->setPos(-5.0f, -5.0f, -5.0f, 0.0f);
> Shared->Sun->setAmbient(0.0f, 0.0f, 0.0f);
>
> // Set up shadowing
> Shared->Sun->setSpotDir(1.0, 1.0, 1.0);
> pfFrustum *frust = new pfFrustum();
> frust->makeSimple(60.0f);
> Shared->Sun->setAttr(PFLS_PROJ_FRUST, frust);
> Shared->Sun->setVal(PFLS_SHADOW_SIZE, 512);
> Shared->Sun->setVal(PFLS_SHADOW_DISPLACE_SCALE,
> 1.0);
> Shared->Sun->setVal(PFLS_SHADOW_DISPLACE_OFFSET,
> 0.002);
>
------------------------------------------------------------------
>
> Shadows are turned on by:
>
>
-------------------------------------------------------------------
> if(Shared->drawShadows) {
> Shared->Sun->setMode(PFLS_SHADOW_ENABLE, PF_ON);
> } else {
> Shared->Sun->setMode(PFLS_SHADOW_ENABLE,
> PF_OFF);
> }
>
--------------------------------------------------------------------
>
> Hope this helps,
> Frank
>
>
>
-----------------------------------------------------------------------
> List Archives, Info, FAQ:
> http://www.sgi.com/software/performer/
> Open Development Project:
> http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests:
> info-performer-request++at++sgi.com
>
-----------------------------------------------------------------------
>
>

        
                
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 27 2005 - 11:57:33 PST