From 07e853d637afdb2663718fe2d005b7273f9aef6f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 15 May 2018 23:30:37 +0200 Subject: [PATCH] external plugins now can control the fog in the Rug mode --- rug.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rug.cpp b/rug.cpp index 849e6c1e..8d6ac4b8 100644 --- a/rug.cpp +++ b/rug.cpp @@ -1240,6 +1240,10 @@ void prepareTexture() { double xview, yview; +bool no_fog; + +ld lowrug = 1e-2, hirug = 1e3; + void drawRugScene() { glbuf->use_as_texture(); @@ -1275,7 +1279,7 @@ void drawRugScene() { xview = stereo::tanfov; yview = stereo::tanfov * vid.yres / vid.xres; - glhr::projection_multiply(glhr::frustum(xview, yview, .01, 100)); + glhr::projection_multiply(glhr::frustum(xview, yview, lowrug, hirug)); xview = -xview; yview = -yview; if(!rug_perspective) @@ -1302,6 +1306,7 @@ void drawRugScene() { glhr::color2(0xFFFFFFFF); glhr::fog_max( + no_fog ? 1000 : gwhere == gSphere && rug_perspective ? 10 : gwhere == gElliptic && rug_perspective ? 4 : 100