The attached patch file has bugfix and some optimize as
1. Fixed incorrect near clip volume generate for near
2. Use Plane::Plane(const Vector3& rkNormal, const
Vector3& rkPoint) constructor instead of
Plane::Plane(const Vector3& rkNormal, Real fConstant)
to construct plane.
3. Make sure zfail compatible with zpass algorithm even
if two-side stencil enabled.
4. Optimize zfail/zpass algorithm determine, use zfail
for the object is EXACTLY required it ONLY, not for ALL
objects when at least one object requires it.
5. Dark cap only require for zfail algorithm.
6. Clean code and minimize stencil state change for
rendering shadow renderables.
7. Use stencil wrap always if it's present.
8. Some other code clean ...
Log in to post a comment.