Enumerations |
|
enum | RpMatFXSkyPipeline { rpNAMATFXSKYPIPELINE = 0, rpMATFXSKYATOMICPS2ALLPIPELINE = 1, rpMATFXSKYATOMICUV2PS2ALLPIPELINE = 2, rpMATFXSKYWORLDSECTORPS2ALLPIPELINE = 3, rpMATFXSKYWORLDSECTORUV2PS2ALLPIPELINE = 4, rpMATFXSKYPS2ALLMATPIPELINE = 5, rpMATFXSKYUV2PS2ALLMATPIPELINE = 6, rpMATFXSKYPIPELINEMAX, rpMATFXSKYPIPELINEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT } |
enum | RpMatFXSkyRenderState { rpMATFXSKYRENDERSTATENARENDERSTATE = 0, rpMATFXSKYRENDERSTATEALPHA, rpMATFXSKYRENDERSTATEFOGCOL, rpMATFXSKYRENDERSTATETEST, rpMATFXSKYRENDERSATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT } |
Functions |
|
RxPipeline * | RpMatFXGetSkyPipeline (RpMatFXSkyPipeline ps2Pipeline) |
RwBool | RpMatFXMaterialSkyRenderStateSet (RpMaterial *material, RpMatFXMaterialFlags effect, RwUInt32 state, void *param) |
RwBool | RpMatFXMaterialSkyRenderStateGet (RpMaterial *material, RpMatFXMaterialFlags effect, RwUInt32 state, void *param) |
All effects are supported: environment mapping, bump mapping, combined bump and environment mapping, dual pass, UV transform, and dual UV transform.
Environment Mapping
Environment mapping is performed additively in two passes. The blending works differently on PlayStation 2 compared with other platforms:
Bump mapping is performed in two passes. With the bump map stored in the alpha channel, an emboss effect is achieved by sampling the texture twice with slightly shifted texture coordinates and using INVSRCALPHA and SRCALPHA blending modes respectively in the two passes. The texture coordinate offsets are calculated from the X and Y projections of the vertex normal in the bump frame.
This method is fast and efficient, and gives the impression of bumps but does not actually approximate a realisitic lighting calculation. A consequence of this is that the sense of the bumps (whether they protrude in or out) cannot be guaranteed with dynamic objects.
More realistic calculations would require expensive per vertex operations on VU1, or a significant amount of additional memory/DMA for arrays containing vertex tangents.
Bump + Environment Mapping
This is performed in 3 passes using a combination of the bump and environment effects. The 'useFrameBufferAlpha' option allows the envmap to be modulated by the bump alpha value from the previous pass. This gives a more realistic effect with specular highlights being affected by the bumps.
|
|
|
|
Returns one of the RpMatFX internal PlayStation 2 specific pipelines. The matfx plugin must be attached before using this function.
|
|
RpMatFXMaterialSkyRenderStateGet Gets a PlayStation 2 specific renderstate element for second or third pass rendering. The matfx plugin must be attached before using this function.
|
|
RpMatFXMaterialSkyRenderStateSet Sets a PlayStation 2 specific renderstate element for second or third pass rendering. These renderstates are currently only supported by environment map, dual pass and dual pass uv transform pipelines. The matfx plugin must be attached before using this function.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |