Removed fog

This commit is contained in:
2026-03-16 23:43:09 -03:00
parent 66de5f731a
commit 30af69dd07

View File

@@ -32,7 +32,7 @@ static const int SCREEN_W = 1280;
static const int SCREEN_H = 720;
static const int CHUNK_SIZE = 16;
static const int WORLD_H = 64;
static const int RENDER_DIST = 16; // sensible default; easily changed
static const int RENDER_DIST = 10; // sensible default; easily changed
static const float MOVE_SPEED = 6.0f;
static const float MOUSE_SENS = 0.12f;
static const float GRAVITY = -22.0f;
@@ -40,6 +40,7 @@ static const float JUMP_VEL = 9.0f;
static const float HW = 0.3f;
static const float PH = 1.8f;
static const int HOTBAR_SIZE = 8;
static const int WORLD_SEED = 2039403;
// How many chunk meshes we build per frame (tune up/down for perf vs pop-in)
static const int MESH_BUILDS_PER_FRAME = 4;
// Worker threads for chunk generation
@@ -401,7 +402,8 @@ void main(){
gl_Position = uMVP * vec4(aPos,1.0);
vColor = aColor;
float dist = length(aPos - uCamPos);
vFog = clamp((dist - 80.0) / 60.0, 0.0, 1.0);
//vFog = clamp((dist - 80.0) / 60.0, 0.0, 1.0);
vFog = 0;
})";
static const char* FS_SRC = R"(
@@ -799,7 +801,7 @@ int main(){
GLint camLoc=glGetUniformLocation(prog3d,"uCamPos");
UI.init();
initNoise(12345);
initNoise(WORLD_SEED);
std::cout<<"Using "<<GEN_THREADS<<" generation threads, RENDER_DIST="<<RENDER_DIST<<"\n";
POOL.start(GEN_THREADS);