76 u32 abs, select, scale;
90 C3DF_LightEnv_Dirty =
BIT(0),
91 C3DF_LightEnv_MtlDirty =
BIT(1),
92 C3DF_LightEnv_LCDirty =
BIT(2),
94#define C3DF_LightEnv_IsCP(n) BIT(18+(n))
95#define C3DF_LightEnv_IsCP_Any (0xFF<<18)
96#define C3DF_LightEnv_LutDirty(n) BIT(26+(n))
97#define C3DF_LightEnv_LutDirtyAll (0x3F<<26)
160 GPU_SHADOW_PRIMARY =
BIT(16),
161 GPU_SHADOW_SECONDARY =
BIT(17),
162 GPU_INVERT_SHADOW =
BIT(18),
163 GPU_SHADOW_ALPHA =
BIT(19),
234 u32 specular0, specular1, diffuse, ambient;
240 u16 position[3];
u16 padding0;
241 u16 spotDir[3];
u16 padding1;
244 u32 distAttnBias, distAttnScale;
249 C3DF_Light_Enabled =
BIT(0),
250 C3DF_Light_Dirty =
BIT(1),
251 C3DF_Light_MatDirty =
BIT(2),
256 C3DF_Light_SPDirty =
BIT(14),
257 C3DF_Light_DADirty =
BIT(15),
void C3D_LightEnvMaterial(C3D_LightEnv *env, const C3D_Material *mtl)
Coppies material properties to C3D_LightEnv.
void C3D_LightSpecular0(C3D_Light *light, float r, float g, float b)
Configures specular0 lighting color emitted by light source.
void C3D_LightAmbient(C3D_Light *light, float r, float g, float b)
Configures global ambient color emitted by light source.
void C3D_LightEnable(C3D_Light *light, bool enable)
Enables or disables light source.
void C3D_LightEnvLut(C3D_LightEnv *env, GPU_LIGHTLUTID lutId, GPU_LIGHTLUTINPUT input, bool negative, C3D_LightLut *lut)
Uploads pre-calculated lighting lookup table for specified function.
void C3D_LightEnvBumpSel(C3D_LightEnv *env, int texUnit)
Configures bump map texture unit id.
void C3D_LightEnvBumpMode(C3D_LightEnv *env, GPU_BUMPMODE mode)
Configures bump map texture properties.
void C3D_LightEnvAmbient(C3D_LightEnv *env, float r, float g, float b)
Sets global ambient lighting.
void C3D_LightEnvBind(C3D_LightEnv *env)
Binds C3D_LightEnv pointer to be used for configuring internal state.
void C3D_LightShadowEnable(C3D_Light *light, bool enable)
Enables or disables shadow mapping on light source.
void C3D_LightSpecular1(C3D_Light *light, float r, float g, float b)
Configures specular1 lighting color emitted by light source.
void C3D_LightEnvFresnel(C3D_LightEnv *env, GPU_FRESNELSEL selector)
Enables or disables writing fresnel and shadow alpha component to GPU_FRAGMENT_PRIMARY_COLOR and GPU_...
void C3D_LightEnvShadowMode(C3D_LightEnv *env, u32 mode)
Configures shadow mapping behavior.
void C3D_LightPosition(C3D_Light *light, C3D_FVec *pos)
Configures light position vector.
void C3D_LightEnvBumpNormalZ(C3D_LightEnv *env, bool enable)
Configures whether to use the z component of the normal map.
void C3D_LightTwoSideDiffuse(C3D_Light *light, bool enable)
Enables or disables light source.
void C3D_LightDistAttnEnable(C3D_Light *light, bool enable)
Enables or disables distance attenuation for specified light source.
void C3D_LightSpotEnable(C3D_Light *light, bool enable)
Enables or disables spot light for specified light source.
void C3D_LightGeoFactor(C3D_Light *light, int id, bool enable)
Enables or disables cock-torrance geometric factor.
void C3D_LightSpotLut(C3D_Light *light, C3D_LightLut *lut)
Configures spotlight lookup table.
void C3D_LightDistAttn(C3D_Light *light, C3D_LightLutDA *lut)
Uploads pre-calculated distance attenuation lookup table for specified light source.
void C3D_LightDiffuse(C3D_Light *light, float r, float g, float b)
Configures diffuse lighting color emitted by light source.
void C3D_LightSpotDir(C3D_Light *light, float x, float y, float z)
Configures spot light direction vector for specified light source.
void C3D_LightEnvShadowSel(C3D_LightEnv *env, int texUnit)
Configures shadow mapping texture.
int C3D_LightInit(C3D_Light *light, C3D_LightEnv *env)
Adds light to C3D_LightEnv.
void C3D_LightEnvInit(C3D_LightEnv *env)
Resets and initializes C3D_LightEnv structure to default values.
void C3D_LightEnvClampHighlights(C3D_LightEnv *env, bool clamp)
Enables or disables clamping specular highlights.
static void C3D_LightColor(C3D_Light *light, float r, float g, float b)
Configures diffuse and specular0/1 color emitted by light source.
Definition light.h:404
Generate lighting lookup tables.
Basic math library for matrix, vector, and quaternion operations.
Material.
Definition light.h:57
Float vector.
Definition types.h:52