nn::gr::CTR::ProcedureTexture Class

Syntax

class ProcedureTexture

Description

Class for generating procedural texture commands.

Enumerated Types

ProcedureTextureColorShift Constants related to lookup tables for procedural textures.

Member Constants

S PROCTEX_LOOKUP_TABLE_ELEMENT_NUM const u32 The lookup table stores 128 data elements.
S PROCTEX_COLOR_LOOKUP_TABLE_ELEMENT_NUM const u32 The color lookup table stores 256 data elements.
protected S PROCTEX_LOOKUP_TABLE_OPTION_CMD_NUM const u32 The size of the commands added to send a lookup table.
protected S PROCTEX_LOOKUP_TABLE_CMD_NUM const u32 The size of an array that holds commands used to send a lookup table.
protected S PROCTEX_COLOR_LOOKUP_TABLE_OPTION_CMD_NUM const u32 The size of the commands added to send a color lookup table.
protected S PROCTEX_COLOR_LOOKUP_TABLE_CMD_NUM const u32 The size of an array that holds commands used to send a color lookup table.

Member Variables

rgbMap PicaDataProcTexMap RGB mapping function mode. Type is PicaDataProcTexMap. Corresponds to the dmp_Texture[3].ptRgbMap uniform.
alphaMap PicaDataProcTexMap Alpha mapping function mode. Type is PicaDataProcTexMap. Corresponds to the dmp_Texture[3].ptAlphaMap uniform.
alphaSeparate bool Specifies whether the mapping function should handle alpha values separately. Type is bool. Corresponds to the dmp_Texture[3].ptAlphaSeparate uniform.
clampU PicaDataProcTexClamp A texture's U-direction clamp mode. Type is PicaDataProcTexClamp. Corresponds to the dmp_Texture[3].ptClampU uniform.
clampV PicaDataProcTexClamp A texture's V-direction clamp mode. Type is PicaDataProcTexClamp. Corresponds to the dmp_Texture[3].ptClampV uniform.
shiftU PicaDataProcTexShift A texture's U-direction shift calculation mode. Type is PicaDataProcTexShift. Corresponds to the dmp_Texture[3].ptShiftU uniform.
shiftV PicaDataProcTexShift A texture's V-direction shift calculation mode. Type is PicaDataProcTexShift. Corresponds to the dmp_Texture[3].ptShiftV uniform.
minFilter PicaDataProcTexFilter A texture's MinFilter setting. Type is PicaDataProcTexFilter. Corresponds to the dmp_Texture[3].ptMinFilter uniform.
texBias f32  The color lookup table's LOD bias. Type is f32, value range is [0.0, 6.0], default value is 0.5f. Corresponds to the dmp_Texture[3].texBias uniform.
texOffset u8 Specifies the starting element of the partial array in use. Type is u8, value range is [0, 128], default value is 0. Corresponds to the dmp_Texture[3].ptTexOffset uniform.
texWidth u8 Specifies the width of lookup table data. Type is u8, value range is [0, 128], default value is 0. Corresponds to the dmp_Texture[3].ptTexWidth uniform.
isEnableNoise bool Specifies whether to enable noise. Type is bool, default value is false. Corresponds to the dmp_Texture[3].ptNoiseEnable uniform.
noiseUAmplitude f32 Sets the amplitude of a texture's U-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseU[2] uniform.
noiseVAmplitude f32 Sets the amplitude of a texture's V-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseV[2] uniform.
noiseUFrequency f32 Sets the frequency of a texture's U-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseU[0] uniform.
noiseVFrequency f32 Sets the frequency of a texture's V-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseV[0] uniform.
noiseUPhase f32 Sets the phase of a texture's U-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseU[1] uniform.
noiseVPhase f32 Sets the phase of a texture's V-direction noise. Type is f32, default value is 0.0f. Corresponds to the dmp_Texture[3].ptNoiseV[1] uniform.
protected m_NoiseLookUpTableCommand u32 Holds the continuous noise function's lookup table, converted into rendering command format. Type is u32[].
protected m_RgbMapLookUpTableCommand u32 Holds the RGB mapping function's lookup table, converted into rendering command format. Type is u32[].
protected m_AlphaMapLookUpTableCommand u32 Holds the alpha mapping function's lookup table, converted into rendering command format. Type is u32[].
protected m_ColorLookUpTableCommand u32 Holds a color lookup table that has been converted into rendering command format. Type is u32[].
protected m_ColorDiffLookUpTableCommand u32 Holds the difference values for a color lookup table, converted into rendering command format. Type is u32[].

Member Functions

SetNoiseLookUpTable Sets the lookup table for the continuous noise function.
SetRgbMapLookUpTable Sets the lookup table for the RGB mapping function.
SetAlphaMapLookUpTable Sets the lookup table for the alpha mapping function.
SetRedLookUpTable Sets the color lookup table for the red component.
SetGreenLookUpTable Sets the color lookup table for the green component.
SetBlueLookUpTable Sets the color lookup table for the blue component.
SetAlphaLookUpTable Sets the color lookup table for the alpha component.
MakeAllCommand Generates all commands for configuring procedural texture registers.
MakeConfigCommand Generates all commands for configuring procedural textures. (Does not generate lookup table commands.)
MakeProcedureTextureModeCommand Generates just the commands for configuring procedural texture mode settings.
MakeTextureCommand Generates just the commands for configuring texture settings for a procedural texture.
MakeNoiseCommand Generates just the commands for configuring procedural texture noise settings.
MakeTableCommand Generates just the commands for configuring procedural texture lookup tables.
ProcedureTexture Constructor of class for generating procedural texture commands.
S MakeDummyCommand Generates dummy commands to register 0x80 required before updating procedural texture registers.
protected SetLookUpDualTables_ Sets lookup table commands in a rendering command array.
protected SetColorLookUpDualTables_ Sets commands for a color lookup table and difference table in a rendering command array.
protected SetColorLookUpTable_ Sets color lookup table commands in a rendering command array.
protected SetColorDiffLookUpTable_ Sets commands for a lookup table's difference values in a rendering command array.
protected GetColorDiffLookUpTable Finds the difference values for a 256-element lookup table.
protected GetDiffLookUpTable Finds the difference values for a 128-element lookup table.

Revision History

2010/10/25
Initial version.

CONFIDENTIAL