Rendering

More...

Classes:

class

A fullscreen shader effect.

class

Definition of a named texture target playing a Theora video.

Enumerations

enum
PFXRenderTime {
  PFXBeforeBin 
  PFXAfterBin 
  PFXAfterDiffuse 
  PFXEndOfFrame 
  PFXTexGenOnDemand 
}

When to process this effect during the frame.

enum
PFXTargetClear {
  PFXTargetClear_None 
  PFXTargetClear_OnCreate 
  PFXTargetClear_OnDraw 
}

Describes when the target texture should be cleared.

enum
PFXTargetViewport {
  PFXTargetViewport_TargetSize 
  PFXTargetViewport_GFXViewport 
  PFXTargetViewport_NamedInTexture0 
}

Specifies how the viewport should be set up for a PostEffect's target.

Variables

bool

User preference which toggles shadows from imposters. Defaults to true.

float

User perference for scaling the TSShape level of detail. The smaller the value the closer the camera must get to see the highest LOD. This setting can have a huge impact on performance in mesh heavy scenes. The default value is 1.

bool

Used to disable the somewhat expensive terrain occlusion testing.

bool

If true, zone culling will be disabled and the scene contents will only be culled against the root frustum.

int

The number of frames that have been rendered since this control was created.

int

ReflectionManager tries not to spend more than this amount of time updating reflections per frame.

int

Samples taken every nth frame.

bool

Debug tool which locks the frustum culling to the current camera location.

int

Enables mesh instancing on non-skin meshes that have less that this count of verts. The default value is 2000. Higher values can degrade performance.

int

Maximum number of occluders that will be concurrently allowed into the scene culling state of any given zone.

int

The scale of the rendertargets.

float

RefractTex has dimensions equal to the active render target scaled in both x and y by this float.

bool

If true, the bounding boxes of objects will be displayed.

int

User perference which causes TSShapes to skip loading higher lods. This potentialy reduces the GPU resources and materials generated as well as limits the LODs rendered. The default value is 0.

int

User perference which causes TSShapes to skip rendering higher lods. This will reduce the number of draw calls and triangles rendered and improve rendering performance when proper LODs have been created for your models. The default value is 0.

float

User perference which sets the smallest pixel size at which TSShapes will skip rendering. This will force all shapes to stop rendering when they get smaller than this size. The default value is -1 which disables it.

bool

Use the latest view transform when rendering stereo instead of the one calculated by the last move.

float

Radius to affect the wind.

Functions

void
addGlobalShaderMacro(string name, string value)

Adds a global shader macro which will be merged with the script defined macros on every shader. The macro will replace the value of an existing macro of the same name. For the new macro to take effect all the shaders in the system need to be reloaded.

void
beginSampling(string location, string backend)

Takes a string informing the backend where to store sample data and optionally a name of the specific logging backend to use. The default is the CSV backend. In most cases, the logging store will be a file name.

void
enableSamples(string pattern, bool state)

Enable sampling for all keys that match the given name pattern. Slashes are treated as separators.

int

Returns the count of active DDSs files in memory.

String
getBitmapInfo(string filename)

Returns image info in the following format: width TAB height TAB bytesPerPixel TAB format. It will return an empty string if the file is not found.

void
playJournalToVideo(string journalFile, string videoFile, string encoder, float framerate, Point2I resolution)

Load a journal file and capture it video.

void

Removes an existing global macro by name.

void
startVideoCapture(GuiCanvas canvas, string filename, string encoder, float framerate, Point2I resolution)

Begins a video capture session.

void

Stops the rendering sampler.

void

Stops the video capture session.

Detailed Description

Enumerations

PFXRenderTime

Enumerator

PFXBeforeBin

Before a RenderInstManager bin.

PFXAfterBin

After a RenderInstManager bin.

PFXAfterDiffuse

After the diffuse rendering pass.

PFXEndOfFrame

When the end of the frame is reached.

PFXTexGenOnDemand

This PostEffect is not processed by the manager. It will generate its texture when it is requested.

When to process this effect during the frame.

PFXTargetClear

Enumerator

PFXTargetClear_None

Never clear the PostEffect target.

PFXTargetClear_OnCreate

Clear once on create.

PFXTargetClear_OnDraw

Clear before every draw.

Describes when the target texture should be cleared.

PFXTargetViewport

Enumerator

PFXTargetViewport_TargetSize

Set viewport to match target size (default).

PFXTargetViewport_GFXViewport

Use the current GFX viewport (scaled to match target size).

PFXTargetViewport_NamedInTexture0

Use the input texture 0 if it is named (scaled to match target size), otherwise revert to PFXTargetViewport_TargetSize if there is none.

Specifies how the viewport should be set up for a PostEffect's target.

note:

Applies to both the diffuse target and the depth target (if defined).

Variables

bool canShadow 

User preference which toggles shadows from imposters. Defaults to true.

float detailAdjust 

User perference for scaling the TSShape level of detail. The smaller the value the closer the camera must get to see the highest LOD. This setting can have a huge impact on performance in mesh heavy scenes. The default value is 1.

bool disableTerrainOcclusion 

Used to disable the somewhat expensive terrain occlusion testing.

bool disableZoneCulling 

If true, zone culling will be disabled and the scene contents will only be culled against the root frustum.

int frameCount 

The number of frames that have been rendered since this control was created.

int frameLimitMS 

ReflectionManager tries not to spend more than this amount of time updating reflections per frame.

int frequency 

Samples taken every nth frame.

bool lockCull 

Debug tool which locks the frustum culling to the current camera location.

int maxInstancingVerts 

Enables mesh instancing on non-skin meshes that have less that this count of verts. The default value is 2000. Higher values can degrade performance.

int maxOccludersPerZone 

Maximum number of occluders that will be concurrently allowed into the scene culling state of any given zone.

float occluderMinHeightPercentage 

TODO.

float occluderMinWidthPercentage 

TODO.

int Quality 

The scale of the rendertargets.

float refractTexScale 

RefractTex has dimensions equal to the active render target scaled in both x and y by this float.

bool renderBoundingBoxes 

If true, the bounding boxes of objects will be displayed.

int skipLoadDLs 

User perference which causes TSShapes to skip loading higher lods. This potentialy reduces the GPU resources and materials generated as well as limits the LODs rendered. The default value is 0.

int skipRenderDLs 

User perference which causes TSShapes to skip rendering higher lods. This will reduce the number of draw calls and triangles rendered and improve rendering performance when proper LODs have been created for your models. The default value is 0.

float smallestVisiblePixelSize 

User perference which sets the smallest pixel size at which TSShapes will skip rendering. This will force all shapes to stop rendering when they get smaller than this size. The default value is -1 which disables it.

bool useLatestDisplayTransform 

Use the latest view transform when rendering stereo instead of the one calculated by the last move.

float windEffectRadius 

Radius to affect the wind.

Functions

addGlobalShaderMacro(string name, string value)

Adds a global shader macro which will be merged with the script defined macros on every shader. The macro will replace the value of an existing macro of the same name. For the new macro to take effect all the shaders in the system need to be reloaded.

beginSampling(string location, string backend)

Takes a string informing the backend where to store sample data and optionally a name of the specific logging backend to use. The default is the CSV backend. In most cases, the logging store will be a file name.

beginSampling( "mysamples.csv" );

enableSamples(string pattern, bool state)

Enable sampling for all keys that match the given name pattern. Slashes are treated as separators.

getActiveDDSFiles()

Returns the count of active DDSs files in memory.

getBitmapInfo(string filename)

Returns image info in the following format: width TAB height TAB bytesPerPixel TAB format. It will return an empty string if the file is not found.

playJournalToVideo(string journalFile, string videoFile, string encoder, float framerate, Point2I resolution)

Load a journal file and capture it video.

removeGlobalShaderMacro(string name)

Removes an existing global macro by name.

startVideoCapture(GuiCanvas canvas, string filename, string encoder, float framerate, Point2I resolution)

Begins a video capture session.

stopSampling()

Stops the rendering sampler.

stopVideoCapture()

Stops the video capture session.