Author Topic: Renderer feature  (Read 3400 times)

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Renderer feature
« on: May 08, 2008, 06:55:19 pm »
Hello.

I need to solve a problem where two objects have (partial) identical plane coordinates. Imagine two boxes with same size and position but different textures. This causes flicker once transforming the objects together. Before I go to dramatic changes I'd like to know if jPCT is capable of prior the rendering of one object, by defining which object to appear.

Regards
Ducky

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Renderer feature
« Reply #1 on: May 08, 2008, 07:12:32 pm »
No, that is called Z fight or something like that. The 2 objects has a face on the same plane so jpct will try to render both. what you can do is moving ons of the a little back or something.
Nada por ahora

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Renderer feature
« Reply #2 on: May 08, 2008, 07:37:46 pm »
Thx for your answer. It led me to "polygon offset":

Quote
Polygon offset was an extension to OpenGL 1.0, and is now incorporated into OpenGL 1.1. It allows an application to define a depth offset, which can apply to filled primitives, and under OpenGL 1.1, it can be separately enabled or disabled depending on whether the primitives are rendered in fill, line, or point mode. Thus, an application can render coplanar primitives by first rendering one primitive, then by applying an offset and rendering the second primitive.

Whole article:
http://www.opengl.org/resources/faq/technical/polygonoffset.htm

Is this feature supported by jPCT in any software renderer? - I guess its available using its OpenGL renderer?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Renderer feature
« Reply #3 on: May 08, 2008, 07:51:24 pm »
Neither of the renderers support this. While it's a feature of OpenGL 1.1 and higher, support for it on current hardware isn't satisfying. I tried using it in the shadow mapping process, but it caused the pipeline to fall back to emulation mode on some cards...it was too slow to be usable. It's better to offset the models in world space instead of faking the offset afterwards.