Class TRenderParams

Unit

Declaration

type TRenderParams = class(TObject)

Description

Information that a TCastleTransform object needs to render. Read-only for TCastleTransform.LocalRender (except Statistics, which should be updated during rendering).

This is mostly an internal class.

You should not need to create it, you should not need to read anything inside or deal with this class otherwise, and actually you should not need to override TCastleTransform.LocalRender during normal engine usage. But it may be useful for special customized rendering.

Hierarchy

  • TObject
  • TRenderParams

Overview

Fields

Public Transparent: boolean;
Public ShadowVolumesReceivers: set of Boolean;
Public InShadow: boolean;
Public StencilTest: Cardinal;
Public InternalPass: TInternalRenderingPass;
Public UserPass: TUserRenderingPass;
Public Transform: PMatrix4;
Public InverseTransform: PMatrix4;
Public Statistics: TRenderStatistics;
Public GlobalFog: TAbstractFogNode;
Public Frustum: PFrustum;
Public RenderingCamera: TRenderingCamera;
Public InMeaningfulParent: Boolean;
Public ProjectionBoxWithoutGizmos: TBox3DEvent;
Public ProjectionBoxWithGizmos: TBox3DEvent;
Public ProjectionViewportWidth: Single;
Public ProjectionViewportHeight: Single;
Public Collector: TObject;
Public RendererToPrepareShapes: TObject;
Public DepthRange: TDepthRange;

Methods

Public constructor Create;
Public function GlobalLights: TAbstractLightInstancesList; virtual; abstract;

Description

Fields

Public Transparent: boolean;

Which parts should be rendered: opaque (False) or transparent (True). This should "filter" the rendered parts by TCastleTransform.LocalRender.

Public ShadowVolumesReceivers: set of Boolean;

Should we render parts that may receive shadow volumes, or ones that don't, or both. This should never be []. During rendering, simply check does it match TCastleScene.ReceiveShadowVolumes. This should "filter" the rendered parts by TCastleTransform.LocalRender.

Public InShadow: boolean;

If True, means that we're using multi-pass shadowing technique (like shadow volumes), and currently doing the "shadowed" pass.

Which means that most lights (ones with shadowVolumes = TRUE) should be turned off, see [https://castle-engine.io/x3d_extensions.php#section_ext_shadows].)

Public StencilTest: Cardinal;

Value > 0 means we're inside some stencil test (like for InShadow = False pass of shadow volumes).

Public InternalPass: TInternalRenderingPass;

Rendering pass number, for internal multi-pass rendering, like for shadow volumes.

Public UserPass: TUserRenderingPass;

Rendering pass number, for user purposes. Multiplied with InternalPass to get final pass number, that determines shaders used.

Public Transform: PMatrix4;

Transformation that should be applied to the rendered result.

Public InverseTransform: PMatrix4;

Transformation that should be applied to the rendered result.

Public Statistics: TRenderStatistics;

Current rendering statistics, should be updated by each TCastleTransform.LocalRender call.

Public GlobalFog: TAbstractFogNode;

Fog that affects all scenes.

Public Frustum: PFrustum;

Camera frustum in local coordinates. Local for the TCastleTransform instance receiving this TRenderParams as TCastleTransform.LocalRender parameter, so it may be different from RenderingCamera.Frustum.

As a special exception, it can be Nil, but only when TCastleScene.LocalRender is called (this happens from TBackgroundScene.Render). The TCastleScene.LocalRender should ignore frustum when it is Nil.

Public RenderingCamera: TRenderingCamera;

Camera information for renderer.

Public InMeaningfulParent: Boolean;

Are we traversing now only inside parents with MeaningfulParent, i.e. outside of TCastleTransformReference.Reference.

Public ProjectionBoxWithoutGizmos: TBox3DEvent;

At design-time, cameras update their own projection, to show camera gizmo. These are parameters to do this.

Public ProjectionBoxWithGizmos: TBox3DEvent;

At design-time, cameras update their own projection, to show camera gizmo. These are parameters to do this.

Public ProjectionViewportWidth: Single;

This item has no description.

Public ProjectionViewportHeight: Single;

This item has no description.

Public Collector: TObject;

Always TShapesCollector at actual rendering.

Public RendererToPrepareShapes: TObject;

Always TRenderer, to prepare shapes. This is useful to prepare shapes (rendering them with renderer creates VBOs, shaders, and makes them "ready" for next fast rendering).

Note that shapes and scenes *should not* get associated with this TRenderer instance when being prepared. Shapes and scenes should remain independent of TRenderer instance, to easily change them to a different renderer (like a differe TCastleViewport). So this TRenderer instance is provided to be used, but do not keep anywhere in shapes / scenes a reference to it.

See CastleInternalRenderer for more comments how are things associated.

Public DepthRange: TDepthRange;

Depth range that should be used for rendering.

Methods

Public constructor Create;

This item has no description.

Public function GlobalLights: TAbstractLightInstancesList; virtual; abstract;

Lights that shine on object (headlight and lights from all scenes with CastGlobalLights).


Generated by PasDoc 0.16.0-snapshot.