Compiled objects

From JPCT
Revision as of 19:44, 7 April 2009 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiled Objects

compiled objects are a new feature in jPCT 1.18 and higher. By default, jPCT uses a render-pipeline that i call hybrid-pipeline, because it processes software- and hardware rendered scenes in a very similar way. When compiling an object, another, more hardware oriented pipeline is used. Compiling usually increases performance but it has some drawbacks too. Here's a brief overview:

Advantages

  • It's much faster than the default pipeline for higher polygon counts (up to 80times faster in my tests)
  • Shaders are possible for compiled objects by using the IRenderHook

Disadvantages/Limitations

  • A compiled object can only use as many texture stages as the hardware offers. On current hardware, this means 4, on something like a GeForce2, it means 2. Anything higher will be discarded.
  • Only the 8 nearest light sources will affect the lighting, not all lights
  • Config.lightMul is implicitly set to 1 for a compiled object
  • environment mapping is done in world space only