Minetest  5.4.0
light.cpp File Reference
#include "light.h"
#include <algorithm>
#include <cmath>
#include "util/numeric.h"
#include "settings.h"
+ Include dependency graph for light.cpp:

Classes

struct  LightingParams
 

Functions

float decode_light_f (float x)
 
void set_light_table (float gamma)
 

Variables

static u8 light_LUT [LIGHT_SUN+1]
 
const u8 * light_decode_table = light_LUT
 
static LightingParams params
 

Function Documentation

◆ decode_light_f()

float decode_light_f ( float  x)

References LightingParams::a, LightingParams::b, LightingParams::boost, LightingParams::c, LightingParams::center, LightingParams::gamma, params, LightingParams::sigma, and sqr().

Referenced by set_light_table(), and Game::updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_light_table()

void set_light_table ( float  gamma)

References LightingParams::a, LightingParams::b, LightingParams::boost, LightingParams::c, LightingParams::center, decode_light_f(), g_settings, LightingParams::gamma, Settings::getFloat(), light_LUT, LIGHT_SUN, params, rangelim, and LightingParams::sigma.

Referenced by Game::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ light_decode_table

const u8* light_decode_table = light_LUT

Referenced by decode_light().

◆ light_LUT

u8 light_LUT[LIGHT_SUN+1]
static

Referenced by set_light_table().

◆ params