wavelength 1.0.0
Loading...
Searching...
No Matches
psmat.h File Reference
#include <cstddef>
#include "math/color.h"
#include "math/transform.h"
#include "math/vector3.h"
#include "os/mem.h"
#include "rnd/rndmat.h"
Include dependency graph for psmat.h:

Go to the source code of this file.

Classes

class  PsMat
 Material, PlayStation 2. More...

Variables

int g_nSelectedGenMode
 Texture coordinate generation mode of the stage PsMat::SetupUvXfm() last processed.
int g_nSelectedFlat
 Flat shading flag of the selected material.
int g_nTextured
 Non-zero while a stage texture is bound.
int g_nAlphaBlendEnabled
 Non-zero once ALPHA_1 is a blending equation rather than an opaque copy.
int g_nLightingEnabled
 Lighting flag of the selected material, cleared when the stage texture is applied as a decal.
int g_nReselectBlend
 Non-zero after PsMat::SelectAlphaBlend(), until the next PsMat::Select() of the selected material selects its blend again.
Color g_colorScale
 Scale from a vertex colour component to the GS range, 128 for a modulated texture and 255 otherwise, with alpha always 128.
Transform g_uvXfm
 Transform of the texture coordinates of the selected stage.
Vector3 g_stageXfm [3]
 Basis rows of the stage transform a sphere-mapped stage applies before its sphere map.

Variable Documentation

◆ g_nSelectedGenMode

int g_nSelectedGenMode
extern

Texture coordinate generation mode of the stage PsMat::SetupUvXfm() last processed.

Ghidra address:
NTSC-U/C: 0x003b076c
Ghidra address:
PAL: 0x0042f604

◆ g_nSelectedFlat

int g_nSelectedFlat
extern

Flat shading flag of the selected material.

Ghidra address:
NTSC-U/C: 0x003b0770
Ghidra address:
PAL: 0x0042f608

◆ g_nTextured

int g_nTextured
extern

Non-zero while a stage texture is bound.

Ghidra address:
NTSC-U/C: 0x003b0774
Ghidra address:
PAL: 0x0042f60c

◆ g_nAlphaBlendEnabled

int g_nAlphaBlendEnabled
extern

Non-zero once ALPHA_1 is a blending equation rather than an opaque copy.

Ghidra address:
NTSC-U/C: 0x003b0778
Ghidra address:
PAL: 0x0042f610

◆ g_nLightingEnabled

int g_nLightingEnabled
extern

Lighting flag of the selected material, cleared when the stage texture is applied as a decal.

Ghidra address:
NTSC-U/C: 0x003b077c
Ghidra address:
PAL: 0x0042f614

◆ g_nReselectBlend

int g_nReselectBlend
extern

Non-zero after PsMat::SelectAlphaBlend(), until the next PsMat::Select() of the selected material selects its blend again.

Ghidra address:
NTSC-U/C: 0x003b0780
Ghidra address:
PAL: 0x0042f618

◆ g_colorScale

Color g_colorScale
extern

Scale from a vertex colour component to the GS range, 128 for a modulated texture and 255 otherwise, with alpha always 128.

Ghidra address:
NTSC-U/C: 0x0043c340

◆ g_uvXfm

Transform g_uvXfm
extern

Transform of the texture coordinates of the selected stage.

Ghidra address:
NTSC-U/C: 0x0043c350

◆ g_stageXfm

Vector3 g_stageXfm[3]
extern

Basis rows of the stage transform a sphere-mapped stage applies before its sphere map.

Ghidra address:
NTSC-U/C: 0x0043c390