Custom Effects, Geometry Buffers and ZBuffer

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

royconejo
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 17, 2010 13:58

Custom Effects, Geometry Buffers and ZBuffer

Postby royconejo » Wed Nov 17, 2010 14:24

Hello =)!

I'm implementing 2 RenderEffects, one that draws a sort of "Fake 3D effect" stacking multiple layers of the same window at different Z's (below and above zero, that is -0.2, -0.5, 0.2, 0.5 etc). The other effect replaces the window geometry altogether with some mesh geometry, using the window texture as skin.

My problem is that there is no occlusion testing: no zbuffering even if I enable it. As I understand seeing the code, CEGUI uses a projection matrix (why :??) and draws everything at Z=0. Of course, zbuffering depends on the projection matrix znear/zfar and anything outside that range wont be taken into account. Moreover, I cannot translate the geometry to that valid range since it will be projected (distorted) and any translation of my geometry will change the point of further rotations made by CEGUI (window->setRotation() etc)

How could this problem be solved?

Thanks in advance =)!

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests