remove fog start and fog end parameters

This commit is contained in:
veclavtalica 2025-01-20 19:29:57 +03:00
parent 8a5d639f95
commit 3f9906a918
5 changed files with 3 additions and 9 deletions

View File

@ -13,7 +13,7 @@
#define TERRAIN_FREQUENCY 0.15f #define TERRAIN_FREQUENCY 0.15f
#define TERRAIN_DISTANCE 32 #define TERRAIN_DISTANCE 64
#define HALF_TERRAIN_DISTANCE ((float)TERRAIN_DISTANCE / 2) #define HALF_TERRAIN_DISTANCE ((float)TERRAIN_DISTANCE / 2)
#define PLAYER_HEIGHT 0.6f #define PLAYER_HEIGHT 0.6f
@ -225,8 +225,7 @@ static void ingame_tick(State *state) {
draw_skybox("/assets/miramar/miramar_*.tga"); draw_skybox("/assets/miramar/miramar_*.tga");
ctx.fog_color = (Color){ 140, 147, 160, 255 }; ctx.fog_color = (Color){ 140, 147, 160, 255 };
ctx.fog_start = 0.9f; ctx.fog_density = 0.03f;
ctx.fog_density = 0.05f;
} }

View File

@ -24,7 +24,7 @@ typedef struct Context {
float frame_duration; float frame_duration;
/* it is disabled by having fog_density approximately equal to zero */ /* it is disabled by having fog_density approximately equal to zero */
float fog_start, fog_end, fog_density; float fog_density;
Color fog_color; Color fog_color;
/* resolution is set from config and dictates both logical and drawing space, as they're related */ /* resolution is set from config and dictates both logical and drawing space, as they're related */

View File

@ -281,8 +281,6 @@
"fields": [ "fields": [
{ "name": "frame_number", "type": "float" }, { "name": "frame_number", "type": "float" },
{ "name": "frame_duration", "type": "float" }, { "name": "frame_duration", "type": "float" },
{ "name": "fog_start", "type": "float" },
{ "name": "fog_end", "type": "float" },
{ "name": "fog_density", "type": "float" }, { "name": "fog_density", "type": "float" },
{ "name": "fog_color", "type": "Color" }, { "name": "fog_color", "type": "Color" },
{ "name": "resolution", "type": "Vec2" }, { "name": "resolution", "type": "Vec2" },

View File

@ -454,8 +454,6 @@ void finally_draw_command(DeferredCommandDraw command) {
ctx.game_copy.fog_density = clampf(ctx.game_copy.fog_density, 0.0, 1.0); ctx.game_copy.fog_density = clampf(ctx.game_copy.fog_density, 0.0, 1.0);
glFogf(GL_FOG_DENSITY, ctx.game_copy.fog_density); glFogf(GL_FOG_DENSITY, ctx.game_copy.fog_density);
glFogf(GL_FOG_START, ctx.game_copy.fog_start);
glFogf(GL_FOG_END, ctx.game_copy.fog_end);
float color_conv[4]; float color_conv[4];
color_conv[0] = (float)ctx.game_copy.fog_color.r / UINT8_MAX; color_conv[0] = (float)ctx.game_copy.fog_color.r / UINT8_MAX;

View File

@ -604,7 +604,6 @@ static bool initialize(void) {
ctx.window_mouse_resident = true; ctx.window_mouse_resident = true;
ctx.game.fog_color = (Color){ 255, 255, 255, 255 }; /* TODO: pick some grey? */ ctx.game.fog_color = (Color){ 255, 255, 255, 255 }; /* TODO: pick some grey? */
ctx.game.fog_end = 1.0f;
update_viewport(); update_viewport();