Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
viewport [2020/05/25 13:36] – [Fog] adminviewport [2021/01/22 09:33] – [Creating a viewport at runtime] admin
Line 23: Line 23:
 <file pascal Form1.pas> <file pascal Form1.pas>
 uses uses
-  FMX.UITypes,+  System.UITypes, // on elder IDE versions FMX.UITypes
   Gorilla.Viewport;   Gorilla.Viewport;
  
Line 35: Line 35:
 </file> </file>
  
 +===== Rendering-Pipeline =====
 +
 +Since v0.8.1.x we've changed the default rendering pipeline of the TGorillaViewport.
 +The pipeline is responsible for rendering all render passes and the main scene itself.
 +It computes transparency by using Weighted-Blended-Order-Independent-Transparency (WBOIT) rendering mechanism.
 +
 +Read more: [[transparency|Transparency]]
 +
 +==== Rendering-Order ====
 +
 +**Render-Cycle**
 +
 +A render-cycle is the process of rendering everything needed for a frame.
 +
 +  - all pre-processing render passes (represented by instances of TGorillaRenderPassController)
 +  - main render pass
 +  - all post-processing render passes (represented by instances of TGorillaRenderPassController)
 +
 +**Render-Pass**
 +
 +A render pass is a closed unit for rendering specific elements or some kind of effect, inside of a step of the render-cycle.
 +
 +  - all opaque objects (not transparent)
 +  - all transparent objects (rendered into separated buffers)
 +  - compositing opaque and transparent render result
 +
 +Read more: [[renderpass|Renderpasses]]
 ===== Frame-Rate ===== ===== Frame-Rate =====
 ==== Requesting FrameRate (FPS) ==== ==== Requesting FrameRate (FPS) ====
Line 58: Line 85:
 ===== FrustumCulling ===== ===== FrustumCulling =====
  
 +The viewing frustum is a geometric representation of the volume visible to the virtual camera. Naturally, objects outside this volume will not be visible in the final image, so they are discarded. 
 +
 +[[https://en.wikipedia.org/wiki/Hidden-surface_determination#View_frustum_culling|Source:https://en.wikipedia.org/wiki/Hidden-surface_determination#View_frustum_culling]]
 +
 +This is a great boost to the performance of your application, when only objects will be rendered that would be visible.
 +The FrustumCulling property enables or disables the functionality in general.
 +
 +But you can activate/deactivate it for each derived type of TGorillaControl, by setting:
 +<file pascal>
 +GorillaCube1.FrustumCullingCheck := false;
 +</file>
 +
 +If FrustumCullingCheck is set to FALSE, it will always be rendered, wether it's inside or outside of the view frustum.
 +
 +Take care, that the frustum culling may affect render-passes, where a different view matrix is used.
 ===== HighRes ===== ===== HighRes =====
  
 +The High-Resolution property is currently only useful on Android platform.
 +When activating higher resolution, than context size for rendering will be increased by device display scaling factor.
 +
 +Otherwise the size of the viewport will be used for rendering.
 +Deactivated HighRes property could lead to a more rastarized result, but is faster in rendering.
 ===== Fog ===== ===== Fog =====