Difference between revisions of "Compiled objects"

From JPCT
Jump to: navigation, search

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 861

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 862

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 587

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 587

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 241

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 242

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954

Deprecated: assert(): Calling assert() with a string argument is deprecated in /usr/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php on line 954
m
(Advantages)
Line 9: Line 9:
 
* A compiled object can be stripped (if not animated) to save some memory
 
* A compiled object can be stripped (if not animated) to save some memory
 
* A compiled object can share it's compiled data with another one (if they are based on the same mesh)
 
* A compiled object can share it's compiled data with another one (if they are based on the same mesh)
 
+
* A compiled object can share it's texture data with another one (if they are already sharing compiled data)
  
 
==== Disadvantages/Limitations ====
 
==== Disadvantages/Limitations ====

Revision as of 00:12, 2 February 2013

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
  • A compiled object can be stripped (if not animated) to save some memory
  • A compiled object can share it's compiled data with another one (if they are based on the same mesh)
  • A compiled object can share it's texture data with another one (if they are already sharing compiled data)

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

Basically, all objects can be compiled, even animated ones. There are two modes. One for static objects, one for dynamic ones (animated, manipulated by an IVertexController....). The static mode is much faster than the dynamic one...which may still be faster than the default pipeline but that depends.


Compiled objects and jPCT-AE

jPCT-AE uses compiled objects only and compiles them automatically. There's no need for an explicit call to compile() like in the desktop version unless you want to change the automatic behaviour.