DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
RenderInfo Struct Reference

#include <renderinfo.hpp>

Public Attributes

float projection
 
int unk_04 [3]
 
sceVu0FMATRIX view_scaled
 
sceVu0FMATRIX screen
 
sceVu0FMATRIX view
 
sceVu0FMATRIX view_screen
 
sceVu0FMATRIX light_direction
 
sceVu0FMATRIX light_color
 
sceVu0FVECTOR ambient
 
sceVu0FVECTOR scale
 
sceVu0FVECTOR offset
 
sceVu0FVECTOR near
 
sceVu0FVECTOR far
 
sceVu0FVECTOR position
 
sceVu0FVECTOR view_position
 
float pitch
 
float yaw
 
int unk_208 [2]
 
sceVu0FVECTOR clip_max
 
sceVu0FVECTOR clip_min
 
sceVu0FMATRIX perspective
 
sceVu0FMATRIX viewport
 
sceVu0FVECTOR shadow_point
 
sceVu0FVECTOR shadow_normal
 
sceVu0FMATRIX shadow
 
int clip_flags
 
int scissor
 
int scissoring
 
float frame_far_z
 
int shadow_pass
 
int fog_enabled
 
float fog_a
 
float fog_b
 
float fog_far
 
float fog_near
 
u_char fog_red
 
u_char fog_green
 
u_char fog_blue
 
u_char unk_33B
 
int eye_in_model
 
int unlit
 
int unk_344 [3]
 

Detailed Description

Everything a frame is drawn against, kept in one object so that a draw takes a single pointer: the camera, the screen it is projected onto, the lights and the fog. Most of it is derived rather than set — the two matrices a caller supplies are the view and the projection, and the rest is recomputed from them whenever either changes.

The block from scale to far is one clip volume expressed per axis rather than four vectors: x, y and z each get a scale, an offset and the two bounds they are held between.

Definition at line 16 of file renderinfo.hpp.

Constructor & Destructor Documentation

◆ RenderInfo()

RenderInfo::RenderInfo ( )
inline

Definition at line 74 of file renderinfo.hpp.

Member Data Documentation

◆ projection

float RenderInfo::projection

Projection scale the render info was last built from.

Definition at line 17 of file renderinfo.hpp.

◆ unk_04

int RenderInfo::unk_04[3]

Definition at line 18 of file renderinfo.hpp.

◆ view_scaled

sceVu0FMATRIX RenderInfo::view_scaled

View matrix with the screen's aspect squeeze applied.

Definition at line 19 of file renderinfo.hpp.

◆ screen

sceVu0FMATRIX RenderInfo::screen

Camera-space to screen-space projection matrix.

Definition at line 20 of file renderinfo.hpp.

◆ view

sceVu0FMATRIX RenderInfo::view

View matrix the camera supplied.

Definition at line 21 of file renderinfo.hpp.

◆ view_screen

sceVu0FMATRIX RenderInfo::view_screen

World to screen matrix: screen times view_scaled.

Definition at line 22 of file renderinfo.hpp.

◆ light_direction

sceVu0FMATRIX RenderInfo::light_direction

Direction of each parallel light, one per row.

Definition at line 23 of file renderinfo.hpp.

◆ light_color

sceVu0FMATRIX RenderInfo::light_color

Colour of each parallel light, one per row.

Definition at line 24 of file renderinfo.hpp.

◆ ambient

sceVu0FVECTOR RenderInfo::ambient

Ambient light colour.

Definition at line 25 of file renderinfo.hpp.

◆ scale

sceVu0FVECTOR RenderInfo::scale

Screen scale on x and y and depth scale on z.

Definition at line 26 of file renderinfo.hpp.

◆ offset

sceVu0FVECTOR RenderInfo::offset

Screen centre on x and y and depth offset on z.

Definition at line 27 of file renderinfo.hpp.

◆ near

sceVu0FVECTOR RenderInfo::near

Lower screen bounds on x and y and near clip depth on z.

Definition at line 28 of file renderinfo.hpp.

◆ far

sceVu0FVECTOR RenderInfo::far

Upper screen bounds on x and y and far clip depth on z.

Definition at line 29 of file renderinfo.hpp.

◆ position

sceVu0FVECTOR RenderInfo::position

Camera position.

Definition at line 30 of file renderinfo.hpp.

◆ view_position

sceVu0FVECTOR RenderInfo::view_position

Eye position a caller supplied with the view matrix.

Definition at line 31 of file renderinfo.hpp.

◆ pitch

float RenderInfo::pitch

Camera pitch derived from the view matrix.

Definition at line 32 of file renderinfo.hpp.

◆ yaw

float RenderInfo::yaw

Camera yaw derived from the view matrix.

Definition at line 33 of file renderinfo.hpp.

◆ unk_208

int RenderInfo::unk_208[2]

Definition at line 34 of file renderinfo.hpp.

◆ clip_max

sceVu0FVECTOR RenderInfo::clip_max

Upper clip bounds sent to the microprograms, far depth in w.

Definition at line 35 of file renderinfo.hpp.

◆ clip_min

sceVu0FVECTOR RenderInfo::clip_min

Lower clip bounds sent to the microprograms, near depth in w.

Definition at line 36 of file renderinfo.hpp.

◆ perspective

sceVu0FMATRIX RenderInfo::perspective

Perspective matrix into clip space.

Definition at line 37 of file renderinfo.hpp.

◆ viewport

sceVu0FMATRIX RenderInfo::viewport

Clip space to GS screen coordinates matrix.

Definition at line 38 of file renderinfo.hpp.

◆ shadow_point

sceVu0FVECTOR RenderInfo::shadow_point

The plane a frame's shadow is cast onto, kept as a point and a normal, and the projection onto it that ShadowMatrix derives from the pair and the first light direction. Point on the plane shadows are cast onto.

Definition at line 43 of file renderinfo.hpp.

◆ shadow_normal

sceVu0FVECTOR RenderInfo::shadow_normal

Normal of the plane shadows are cast onto.

Definition at line 44 of file renderinfo.hpp.

◆ shadow

sceVu0FMATRIX RenderInfo::shadow

Projection onto the shadow plane along the first light.

Definition at line 45 of file renderinfo.hpp.

◆ clip_flags

int RenderInfo::clip_flags

The block a draw fills in on its way through rather than one the camera setup owns: every field from here to the fog is written by CFrameVu1::DrawVu1 out of the frame's own attributes, so what a microprogram reads here belongs to the frame being drawn and not to the scene. unk_320 is the exception and is a switch the caller sets. Microprogram flags: 1 clips, 2 scissors, 4 is the frame's own switch.

Definition at line 52 of file renderinfo.hpp.

◆ scissor

int RenderInfo::scissor

Whether the frame being drawn crosses the near plane and must be scissored.

Definition at line 53 of file renderinfo.hpp.

◆ scissoring

int RenderInfo::scissoring

Forces scissoring of every frame that crosses the near plane.

Definition at line 54 of file renderinfo.hpp.

◆ frame_far_z

float RenderInfo::frame_far_z

Far depth from the attributes of the frame last drawn.

Definition at line 55 of file renderinfo.hpp.

◆ shadow_pass

int RenderInfo::shadow_pass

Pass being drawn: 0 normal, 1 fast shadow, 2 shadow, 8 shade.

Definition at line 56 of file renderinfo.hpp.

◆ fog_enabled

int RenderInfo::fog_enabled

Whether the frame being drawn takes fog.

Definition at line 57 of file renderinfo.hpp.

◆ fog_a

float RenderInfo::fog_a

Fog is applied as a + b/z, which is what makes both ends of it a division the caller never does: MGSetFogParm takes the two depths and the two densities and solves for the pair. Constant term of the fog factor.

Definition at line 62 of file renderinfo.hpp.

◆ fog_b

float RenderInfo::fog_b

Coefficient of 1/z in the fog factor.

Definition at line 63 of file renderinfo.hpp.

◆ fog_far

float RenderInfo::fog_far

Fog amount at the far fog depth.

Definition at line 64 of file renderinfo.hpp.

◆ fog_near

float RenderInfo::fog_near

Fog amount at the near fog depth.

Definition at line 65 of file renderinfo.hpp.

◆ fog_red

u_char RenderInfo::fog_red

Red component of the fog colour.

Definition at line 66 of file renderinfo.hpp.

◆ fog_green

u_char RenderInfo::fog_green

Green component of the fog colour.

Definition at line 67 of file renderinfo.hpp.

◆ fog_blue

u_char RenderInfo::fog_blue

Blue component of the fog colour.

Definition at line 68 of file renderinfo.hpp.

◆ unk_33B

u_char RenderInfo::unk_33B

Definition at line 69 of file renderinfo.hpp.

◆ eye_in_model

int RenderInfo::eye_in_model

Whether the frame being drawn is sent the eye position in model space for reflection.

Definition at line 70 of file renderinfo.hpp.

◆ unlit

int RenderInfo::unlit

Draws every frame without lighting while nonzero.

Definition at line 71 of file renderinfo.hpp.

◆ unk_344

int RenderInfo::unk_344[3]

Definition at line 72 of file renderinfo.hpp.