Hi Rui,

The changes look reasonable and are now checked into svn/trunk.

On the topic of the crash I don't have an ideas as to the cause, could
you provide more details on the crash and stack trace for it.

Cheers,
Robert.

On 14 March 2012 08:19, Wang Rui <[email protected]> wrote:
> Hi Robert,
>
> I'd like to submit a slightly modified version of the
> ViewDependentShadowMap. It includes two fixes: one is
> in ComputeLightSpaceBounds::update(), which changes the statement "if
> (v.z()<0.0f)" to "if (v.z()<-1.0f)" as clipping space coordinates should be
> transformed to [-1, 1] and should not be discarded unless they go beyond the
> range; the other is
> in ViewDependentShadowMap::computeShadowCameraSettings(), in which I changed
> the line:
> viewMatrix.makeLookAt(frustum.center+positionedLight.lightDir*zMin,
> frustum.center, lightUp);
> to
> viewMatrix.makeLookAt(frustum.center+positionedLight.lightDir*zMin,
> frustum.center+positionedLight.lightDir*zMax, lightUp);
>
> The reason I've done such a change is that for huge scenes like a city on
> the earth, the values of frustum.center can be extremely large, but zMin may
> be very small (e.g., when model depth in light coords equals the model
> radius by chance) in some cases so the result of (eye - center) might jiggle
> while moving around the shadow scene and thus make the shadow map suddenly
> disappear some time. The small change here also considers the effect of zMax
> to avoid such problems.
>
> Another problem I've encountered while testing shadowed scene within RTT
> cameras is that the program may crash when quitting, but a msleep() in
> the destructor seems to avoid it. I don't know the actual reason but believe
> such an unstable way is not suitable so not going to submit it this time.
> :-)
>
> Cheers,
>
> Wang Rui
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to