From: Steven Queen (Steven.Z.Queen++at++nasa.gov)
Date: 06/08/2005 03:40:51
I am also interested (see below) in porting our Performer App from InfiniteReality (which supports the SGI shadow extensions) to the Prism's ATI-based graphics which doesn't not support any of the SGI extensions. It would be very useful if SGI's new line of graphics systems were able to recover some of the lost functionality of the older IRIX-only high-end graphics systems (WITHOUT breaking the older implimentation!).
Another depth map shadow question our team (including SGI programmers) have not been able to solve is finding a method to affect the shadow intensity, i.e. I would like pitch black (stark) shadows not the blended soft shadows (50% gray?) that one gets using the pfShadowLight. Note this is not the "new" shadows using projective textures, but the IR only shadow maps. The shadows are added to the scene as shown below. Not the SHADOW_INTENSITY parameter only serves to darken the whole scene, not adjust the shadow color relative to the object's (its cast onto) diffuse color.
#define SHADOW_INTENSITY (0.5f)
#define SHADOW_FOV (45.0f)
#define SHADOW_SIZE (1024)
#define SHADOW_OFFSET (0.0005f)
void AddShadows()
{
shdLight = pfNewLSource();
pfNodeName(shdLight, "shdLight");
pfLSourcePos(shdLight, 0.0f, 0.0f, 0.0f, 1.0f); /* Make light local */
pfLSourceColor(shdLight, PFLT_DIFFUSE, 1.0f, 1.0f, 1.0f);
pfSpotLSourceDir(shdLight, 0, 0, -1);
shdFrust = pfNewFrust(pfGetSharedArena());
pfLSourceAttr(shdLight, PFLS_PROJ_FRUST, shdFrust);
pfLSourceVal(shdLight, PFLS_INTENSITY, SHADOW_INTENSITY);
pfLSourceVal(shdLight, PFLS_SHADOW_SIZE, SHADOW_SIZE);
pfLSourceVal(shdLight, PFLS_SHADOW_DISPLACE_OFFSET, SHADOW_OFFSET);
DCSshd = pfNewDoubleDCS();
pfAddChild(DCSshd, shdLight);
pfLSourceMode(shdLight, PFLS_SHADOW_ENABLE, PF_ON);
pfLSourceOn(shdLight);
if (shdLight == sunlight) {
pfReplaceChild(scene, shdLight, DCSshd);
} else {
pfAddChild(scene, DCSshd);
}
UpdateShadows();
}
Please help!
Hi,
Am I correct assuming that Performer (3.1.1) does shadow mapping by
using extensions GL_SGIX_shadow, GL_SGIX_shadow_ambient,
GL_SGIX_depth_texture?
Is there any way to get Performer to use matching ARB extensions for
shadow mapping, except by replacing the draw function and doing it
all by myself?
The problem seems to be that our current hardware does not support
SGIX extensions, on hardware which those supports those extensions
shadows work as they should be.
Sincerely,
Harri Mähönen
-- _______________________________________________Steven.Z.Queen++at++nasa.gov NASA, Goddard Space Flight Center Flight Dynamics Analysis Branch, Code 595 V:(301) 286-0988 F:(301) 286-0369 _______________________________________________
This archive was generated by hypermail 2b29 : Wed Jun 08 2005 - 03:40:44 PDT