mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
Fog calculation simplified
This commit is contained in:
parent
c2f130c931
commit
744e473e47
2 changed files with 2 additions and 2 deletions
|
|
@ -28,6 +28,6 @@ void main(){
|
||||||
a_color = vec4(pow(light, vec3(u_gamma)),1.0f);
|
a_color = vec4(pow(light, vec3(u_gamma)),1.0f);
|
||||||
a_texCoord = v_texCoord;
|
a_texCoord = v_texCoord;
|
||||||
a_color.rgb += u_skyLightColor * v_light.a;
|
a_color.rgb += u_skyLightColor * v_light.a;
|
||||||
a_distance = pow(length(viewmodelpos), 1.5);
|
a_distance = length(viewmodelpos);
|
||||||
gl_Position = u_proj * viewmodelpos;
|
gl_Position = u_proj * viewmodelpos;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ void Engine::mainloop() {
|
||||||
level->update();
|
level->update();
|
||||||
level->chunksController->update(settings.chunks.loadSpeed);
|
level->chunksController->update(settings.chunks.loadSpeed);
|
||||||
|
|
||||||
float fovFactor = 1.6f / (float)settings.chunks.loadDistance;
|
float fovFactor = 16.0f / (float)settings.chunks.loadDistance;
|
||||||
worldRenderer.draw(camera, occlusion, fovFactor, settings.fogCurve);
|
worldRenderer.draw(camera, occlusion, fovFactor, settings.fogCurve);
|
||||||
hud.draw();
|
hud.draw();
|
||||||
if (level->player->debug) {
|
if (level->player->debug) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue