citro3d
Loading...
Searching...
No Matches
include
c3d
fog.h
1
#pragma once
2
#include "
types.h
"
3
#include <math.h>
4
5
typedef
struct
6
{
7
u32
data[128];
8
}
C3D_FogLut
;
9
10
typedef
struct
11
{
12
u32
diff[8];
13
u32
color[8];
14
}
C3D_GasLut
;
15
16
static
inline
float
FogLut_CalcZ(
float
depth,
float
near,
float
far)
17
{
18
return
far*near/(depth*(far-near)+near);
19
}
20
21
void
FogLut_FromArray(
C3D_FogLut
* lut,
const
float
data[256]);
22
void
FogLut_Exp(
C3D_FogLut
* lut,
float
density,
float
gradient,
float
near,
float
far);
23
24
void
C3D_FogGasMode(
GPU_FOGMODE
fogMode,
GPU_GASMODE
gasMode,
bool
zFlip);
25
void
C3D_FogColor(
u32
color);
26
void
C3D_FogLutBind(
C3D_FogLut
* lut);
27
28
void
GasLut_FromArray(
C3D_GasLut
* lut,
const
u32
data[9]);
29
30
void
C3D_GasBeginAcc(
void
);
31
void
C3D_GasDeltaZ(
float
value);
32
33
void
C3D_GasAccMax(
float
value);
34
void
C3D_GasAttn(
float
value);
35
void
C3D_GasLightPlanar(
float
min,
float
max,
float
attn);
36
void
C3D_GasLightView(
float
min,
float
max,
float
attn);
37
void
C3D_GasLightDirection(
float
dotp);
38
void
C3D_GasLutInput(
GPU_GASLUTINPUT
input);
39
void
C3D_GasLutBind(
C3D_GasLut
* lut);
GPU_FOGMODE
GPU_FOGMODE
GPU_GASMODE
GPU_GASMODE
GPU_GASLUTINPUT
GPU_GASLUTINPUT
C3D_FogLut
Definition
fog.h:6
C3D_GasLut
Definition
fog.h:11
types.h
u32
uint32_t u32
Generated by
1.9.8