Torque3D Documentation / _generateds / postEffectCommon.h

postEffectCommon.h

Engine/source/postFx/postEffectCommon.h

More...

Classes:

Public Enumerations

enum
PFXRenderTime {
  PFXBeforeBin 
  PFXAfterBin 
  PFXAfterDiffuse 
  PFXEndOfFrame 
  PFXTexGenOnDemand 
}
enum
PFXTargetClear {
  PFXTargetClear_None 
  PFXTargetClear_OnCreate 
  PFXTargetClear_OnDraw 
}

PFXTargetClear specifies whether and how often a given PostEffect's target will be cleared.

enum
PFXTargetViewport {
  PFXTargetViewport_TargetSize 
  PFXTargetViewport_GFXViewport 
  PFXTargetViewport_NamedInTexture0 
}

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

Detailed Description

Public 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.

PFXTargetClear

Enumerator

PFXTargetClear_None

Never clear the PostEffect target.

PFXTargetClear_OnCreate

Clear once on create.

PFXTargetClear_OnDraw

Clear before every draw.

PFXTargetClear specifies whether and how often a given PostEffect's target will be cleared.

PFXTargetViewport

Enumerator

PFXTargetViewport_TargetSize

The default viewport set up to match the target size.

PFXTargetViewport_GFXViewport

Use the current GFX viewport.

PFXTargetViewport_NamedInTexture0

Use the input texture 0 if it is named, otherwise revert to PFXTargetViewport_TargetSize if there is none.

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

Public Functions

DefineEnumType(PFXRenderTime )

DefineEnumType(PFXTargetClear )

DefineEnumType(PFXTargetViewport )

GFX_DeclareTextureProfile(PostFxTextureProfile )

GFX_DeclareTextureProfile(VRDepthProfile )

GFX_DeclareTextureProfile(VRTextureProfile )

GFXDeclareVertexFormat(PFXVertex )

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2012 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23
 24#ifndef _POSTEFFECTCOMMON_H_
 25#define _POSTEFFECTCOMMON_H_
 26
 27#ifndef _DYNAMIC_CONSOLETYPES_H_
 28   #include "console/dynamicTypes.h"
 29#endif
 30
 31
 32/// 
 33enum PFXRenderTime
 34{
 35   /// Before a RenderInstManager bin.
 36   PFXBeforeBin,
 37
 38   /// After a RenderInstManager bin.
 39   PFXAfterBin,
 40
 41   /// After the diffuse rendering pass.
 42   PFXAfterDiffuse,
 43
 44   /// When the end of the frame is reached.
 45   PFXEndOfFrame,
 46
 47   /// This PostEffect is not processed by the manager.
 48   /// It will generate its texture when it is requested.
 49   PFXTexGenOnDemand
 50};
 51
 52DefineEnumType( PFXRenderTime );
 53
 54
 55/// PFXTargetClear specifies whether and how
 56/// often a given PostEffect's target will be cleared.
 57enum PFXTargetClear
 58{
 59   /// Never clear the PostEffect target.
 60   PFXTargetClear_None,
 61
 62   /// Clear once on create.
 63   PFXTargetClear_OnCreate,
 64
 65   /// Clear before every draw.
 66   PFXTargetClear_OnDraw,
 67};
 68
 69DefineEnumType( PFXTargetClear );
 70
 71
 72/// PFXTargetViewport specifies how the viewport should be
 73/// set up for a PostEffect's target.
 74enum PFXTargetViewport
 75{
 76   /// The default viewport set up to match the target size
 77   PFXTargetViewport_TargetSize,
 78
 79   /// Use the current GFX viewport
 80   PFXTargetViewport_GFXViewport,
 81
 82   /// Use the input texture 0 if it is named, otherwise
 83   /// revert to PFXTargetViewport_TargetSize if there is none
 84   PFXTargetViewport_NamedInTexture0,
 85};
 86
 87DefineEnumType( PFXTargetViewport );
 88
 89///
 90struct PFXFrameState
 91{
 92   MatrixF worldToCamera;
 93   MatrixF cameraToScreen;
 94
 95   PFXFrameState() 
 96      :  worldToCamera( true ),
 97         cameraToScreen( true )
 98   {
 99   }
100};
101
102///
103GFX_DeclareTextureProfile( PostFxTextureProfile );
104
105GFX_DeclareTextureProfile( VRTextureProfile );
106
107GFX_DeclareTextureProfile( VRDepthProfile );
108
109///
110GFXDeclareVertexFormat( PFXVertex )
111{
112   /// xyz position.
113   Point3F point;
114
115   /// The screen space texture coord.
116   Point2F texCoord;
117
118   /// 
119   Point3F wsEyeRay;
120};
121
122#endif // _POSTEFFECTCOMMON_H_
123