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