Skip to content

Commit

Permalink
Add C3D_LightEnvBumpUseNormalZ()
Browse files Browse the repository at this point in the history
  • Loading branch information
oreo639 committed Aug 11, 2023
1 parent e882565 commit 85bab15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/c3d/light.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ enum
void C3D_LightEnvFresnel(C3D_LightEnv* env, GPU_FRESNELSEL selector);
void C3D_LightEnvBumpMode(C3D_LightEnv* env, GPU_BUMPMODE mode);
void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit);
void C3D_LightEnvBumpUseNormalZ(C3D_LightEnv *env, bool usez);
void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode);
void C3D_LightEnvShadowSel(C3D_LightEnv* env, int texUnit);
void C3D_LightEnvClampHighlights(C3D_LightEnv* env, bool clamp);
Expand Down
8 changes: 8 additions & 0 deletions source/lightenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,14 @@ void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit)
env->flags |= C3DF_LightEnv_Dirty;
}

void C3D_LightEnvBumpUseNormalZ(C3D_LightEnv *env, bool usez) {
if (usez)
env->conf.config[0] |= BIT(30);
else
env->conf.config[0] &= ~BIT(30);
env->flags |= C3DF_LightEnv_Dirty;
}

void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode)
{
mode &= 0xF<<16;
Expand Down

0 comments on commit 85bab15

Please sign in to comment.