beastapi/beastrenderpass.h File Reference
Render Pass specification.
|
enum | ILBAOSelfOcclusion { ILB_SO_DISABLED = 0,
ILB_SO_SET_ENVIRONMENT,
ILB_SO_ENABLED
} |
|
enum | ILBBasisType |
|
enum | ILBIlluminationMode { ILB_IM_DIRECT_ONLY = 0,
ILB_IM_INDIRECT_ONLY,
ILB_IM_FULL,
ILB_IM_FULL_AND_INDIRECT
} |
|
enum | ILBLightPassType { ILB_LP_LIGHTMAP = 0,
ILB_LP_SHADOWMAP,
ILB_LP_FULLSHADING
} |
|
enum | ILBRNMAllowNegative { ILB_AN_ALLOW = 0,
ILB_AN_DISALLOW,
ILB_AN_DISALLOW_CULL_HORIZON
} |
|
enum | ILBRNMBasis { ILB_RB_HL2 = 0,
ILB_RB_UE3,
ILB_RB_UE3_FLIPPED,
ILB_RB_CUSTOM
} |
|
|
ILBStatus | ILBAddCustomBasisVector (ILBRenderPassHandle pass, const ILBVec3 *basisVector) |
|
ILBStatus | ILBAddFullyBakedLight (ILBRenderPassHandle pass, ILBLightHandle light) |
|
ILBStatus | ILBAddLightToPass (ILBLightPassEntryHandle entry, ILBLightHandle light) |
|
ILBStatus | ILBAddTargetToPass (ILBLightPassEntryHandle entry, ILBTargetEntityHandle target) |
|
ILBStatus | ILBCreateAmbientOcclusionPass (ILBJobHandle job, ILBConstString name, float maxDistance, float coneAngle, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateFullShadingPass (ILBJobHandle job, ILBConstString name, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateIlluminationPass (ILBJobHandle job, ILBConstString name, ILBIlluminationMode mode, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateIlluminationPassSH (ILBJobHandle job, ILBConstString name, ILBIlluminationMode mode, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateLightPass (ILBJobHandle job, ILBConstString name, ILBLightPassType type, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateLightPassEntry (ILBRenderPassHandle pass, ILBLightPassEntryHandle *entry) |
|
ILBStatus | ILBCreateLuaPass (ILBJobHandle job, ILBConstString name, ILBConstString scriptFile, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateNormalPass (ILBJobHandle job, ILBConstString name, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBCreateRNMPass (ILBJobHandle job, ILBConstString name, ILBIlluminationMode mode, int32 samples, ILBRNMBasis basis, ILBRenderPassHandle *pass) |
|
ILBStatus | ILBEnableAOBentNormals (ILBRenderPassHandle pass) |
|
ILBStatus | ILBEnableSignedDistanceField (ILBRenderPassHandle pass, int32 pixelFilterSize, float maxWorldDistance) |
|
ILBStatus | ILBIncludeNormalComponent (ILBRenderPassHandle pass) |
|
ILBStatus | ILBNormalizeTextures (ILBRenderPassHandle pass, bool perChannel) |
|
ILBStatus | ILBRNMMatchNormalIntensity (ILBRenderPassHandle pass) |
|
ILBStatus | ILBSetAllowNegative (ILBRenderPassHandle pass, ILBRNMAllowNegative allow) |
|
ILBStatus | ILBSetAOAdaptive (ILBRenderPassHandle pass, float accuracy, float smooth) |
|
ILBStatus | ILBSetAOContrast (ILBRenderPassHandle pass, float contrast, float scale) |
|
ILBStatus | ILBSetAONumRays (ILBRenderPassHandle pass, int32 minRay, int32 maxRay) |
|
ILBStatus | ILBSetAOSelfOcclusion (ILBRenderPassHandle pass, ILBAOSelfOcclusion selfOcclusion) |
|
ILBStatus | ILBSetAOUniformSampling (ILBRenderPassHandle pass) |
|
ILBStatus | ILBSetLambertianClamp (ILBRenderPassHandle pass, float val) |
|
ILBStatus | ILBSetLambertianScale (ILBRenderPassHandle pass, float scale) |
|
ILBStatus | ILBSetNondirectionalScale (ILBRenderPassHandle pass, float scale) |
|
ILBStatus | ILBSetResolutionScale (ILBRenderPassHandle pass, float scale) |
|
Self Occlusion Mode.
Enumerator |
---|
ILB_SO_DISABLED |
Self Occluded rays will continue beyond the originating object.
|
ILB_SO_SET_ENVIRONMENT |
Self Occluded rays will be set to the environment.
|
ILB_SO_ENABLED |
Objects can self occlude.
|
Illumination Modes.
Enumerator |
---|
ILB_IM_DIRECT_ONLY |
Only direct illumination (no indirect illumination)
|
ILB_IM_INDIRECT_ONLY |
Only indirect illumination (no direct illumination)
|
ILB_IM_FULL |
Both direct and indirect illumination.
|
ILB_IM_FULL_AND_INDIRECT |
Stores both direct+indirect and indirect separately.
|
Light Pass Type.
Enumerator |
---|
ILB_LP_LIGHTMAP |
Stores the incoming light in the light map.
|
ILB_LP_SHADOWMAP |
Stores the shadow mask.
The individual light mask intensity will be proportional to the light source intensity.
|
ILB_LP_FULLSHADING |
Stores the full shading in the light map.
|
Allow Negative.
Enumerator |
---|
ILB_AN_ALLOW |
Allows negative RNM values.
|
ILB_AN_DISALLOW |
Clamps negative RNM values to 0.
|
ILB_AN_DISALLOW_CULL_HORIZON |
As ILB_AN_DISALLOW, and also culls lights below the horizon of each triangle.
|
RNM Basis.
Enumerator |
---|
ILB_RB_HL2 |
Half-Life 2 compatible basis.
|
ILB_RB_UE3 |
Unreal Engine 3 compatible basis.
|
ILB_RB_UE3_FLIPPED |
Unreal Engine 3 basis in untouched order.
|
ILB_RB_CUSTOM |
Allows the user to enter the basis vectors manually.
|
Adds a custom basis vector to be used with ILB_RB_CUSTOM.
Only supported by the RNM pass.
- Parameters
-
pass | the pass |
basisVector | the basis vector to be added. |
- Returns
- The result of the operation.
Add a light to be fully baked to a FullAndIndirectIllumination Pass.
- Parameters
-
pass | the illumination pass to add the light to |
light | the light to add |
- Returns
- The result of the operation.
Add a light to a light pass.
- Parameters
-
entry | the light pass entry to add the light to |
light | the light to add |
- Returns
- The result of the operation.
Add an affected target entity to a light pass.
- Parameters
-
entry | the light pass entry to add the target entity to |
target | the target to add |
- Returns
- The result of the operation.
Creates an Ambient Occlusion render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
maxDistance | the maximum distance to check for occlusion. 0 for infinite. |
coneAngle | the cone angle. Default is 180 |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates a Full Shading render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
- examples-physical/code/materials/materials.cpp, examples/code/atlas/atlas.cpp, examples/code/baking/baking.cpp, examples/code/cache/cache.cpp, examples/code/ernst/ernst.cpp, examples/code/lightsources/lightsources.cpp, examples/code/materials/materials.cpp, examples/code/readback/readback.cpp, examples/code/renderstats/renderstats.cpp, examples/code/rnm/rnm.cpp, examples/code/simple/simple.cpp, and examples/code/uvset/uvset.cpp.
Creates an Illumination render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
mode | Selects Direct Illumination Only, Indirect Illumination only or both. |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates an Illumination render pass with sh output.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
mode | Selects Direct Illumination Only, Indirect Illumination only or both. |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates a Light render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
type | the lighting mode |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates a Light Pass Entry.
- Parameters
-
pass | the light pass to create the entry on |
entry | the created entry |
- Returns
- The result of the operation.
Creates a LUA pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
scriptFile | the file name of the script |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates a Normal render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
Creates an RNM render pass.
- Parameters
-
job | the job to add the pass to |
name | the name of the pass |
mode | Selects Direct Illumination Only, Indirect Illumination only or both. |
samples | Number of samples for non-adaptive RNM. Set to 0 samples to turn on adaptivity (recommended). |
basis | The RNM basis to use |
pass | the handle to store the generated target in |
- Returns
- The result of the operation.
No support in physical rendering.
Calculates the "bent normal" (most visible direction). If this is used, sampling cannot be adaptive. The put will contain normals in RGB and occlusion in A
- Parameters
-
pass | the affected pass, must be an AO pass |
- Returns
- The result of the operation.
No support in physical rendering.
Makes a light pass use signed distance field shadow maps. Each resulting baked pixel will store the distance to the closest shadow transition.
Distances are remapped to the range [0.0, 1.0], where:
- Values below 0.5 indicate pixels that lie in unlit areas. As the distance from the pixel to the shadow transition increases, the value decreases. The minimum value of 0.0f indicates that the pixel is at a distance of at least
maxWorldDistance
from the transition.
- 0.5 indicates a pixel that lies exactly on a shadow transition.
- Values above 0.5 indicate pixels that lie in lit areas. As the distance from the pixel to the shadow transition increases, the value increases. The maximum value of 1.0f indicates that the pixel is at a distance of at least
maxWorldDistance
from the transition.
We strongly recommend that you disable soft shadows on any lights that generate signed distance fields, as sharp shadow transitions generate the best results. Also make sure to specify a high maximum super sampling rate to ensure high quality signed distance fields.
Only enable signed distance fields for a light pass, and only when the light pass is configured to bake shadow maps (ILB_LP_SHADOWMAP). Any other use will produce undefined results. - Parameters
-
pass | the light pass |
pixelFilterSize | Sets the maximum search range in pixels in the image. This is mainly a performance optimization hint, having this set too large will cause excessive overlap rendering which will degrade performance. Default value is 20. |
maxWorldDistance | the maximum world distance to be stored. Default value is 1.0f. |
- Returns
- The result of the operation.
Enables inclusion of a normal component in the RNM pass.
- Parameters
-
- Returns
- The result of the operation.
Normalizes the texture values to the 0..1 range.
Stores the original range per entity which can be collected with the getNormalization* functions.
- Parameters
-
pass | the pass |
perChannel | if enabled normalization will be done individually for each channel |
- Returns
- The result of the operation.
Scales the RNM values to the amplitude of the normal component.
- Parameters
-
- Returns
- The result of the operation.
Determines how the RNM pass handles light contributions that come from below the plane of the surface.
In an ordinary illumination pass, such a light would yield a light contribution of 0. However, in the RNM pass the light can still affect one or two of the RNM basis components. This function determines whether negative RNM components will be taken into account as-is or clamped to 0.
- Parameters
-
pass | the pass |
allow | the allow value (default is ILB_AN_DISALLOW_CULL_HORIZON) |
- Returns
- The result of the operation.
No support in physical rendering.
Enables adaptivity on an AO pass
- Parameters
-
pass | the pass to enable adaptivity on, must be an AO pass |
accuracy | adaptive accuracy, default is 1 |
smooth | smooth value, default is 1 |
- Returns
- The result of the operation.
Sets the contrast and scale of an AO pass.
- Parameters
-
pass | the affected pass, must be an AO pass |
contrast | the desired contrast of the AO pass. Default = 1.0f |
scale | scale of occlusion values. Default = 1.0f |
- Returns
- The result of the operation.
No support in physical rendering.
Sets the number of rays to use in an AO pass
- Parameters
-
pass | the affected pass, must be an AO pass |
minRay | the minimum number of rays to sample for each point, default is 64 |
maxRay | the maximum number of rays to sample for each point, default is 300 |
- Returns
- The result of the operation.
Sets how the AO pass should react to self occlusion.
- Parameters
-
pass | the affected pass, must be an AO pass |
selfOcclusion | the self occlusion mode. Default is ILB_SO_ENABLED. |
- Returns
- The result of the operation.
Enables Uniform Sampling on an AO pass.
When Uniform Sampling is enabled the sampling is not cos()-weighted.
- Parameters
-
pass | the affected pass, must be an AO pass |
- Returns
- The result of the operation.
Enable lambertian clamp on an RNM pass.
- Parameters
-
pass | the pass |
val | the lambertian clamp value |
- Returns
- The result of the operation.
Sets the lambertian scale on a light pass.
This configures the amount of lambertian reflectance (N * L) to be weighted into the resulting direct lighting. A scale of 1.0f will render the light that is reflected by the surface, just like the ordinary illumination pass. A scale of 0.0f renders the incoming light on the surface, disregarding the orientation from the surface to the light source. This can be useful if you want to do surface shading at a later stage. Please note that this makes sense to bake only for single light sources and only for direct lighting.
- Parameters
-
pass | the pass |
scale | the scale of influcence from lambertian reflectance (N*L) |
- Returns
- The result of the operation.
Scales the nondirectional influence of materials.
Only supported by the RNM pass.
- Parameters
-
pass | the pass |
scale | the nondirectional scale factor. |
- Returns
- The result of the operation.
Scales the resolution on all texture targets for the pass.
- Parameters
-
pass | the pass |
scale | the resolution scale factor. |
- Returns
- The result of the operation.
Go to the source code of this file.