mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
external plugins now can control the fog in the Rug mode
This commit is contained in:
parent
4550a64bdd
commit
07e853d637
7
rug.cpp
7
rug.cpp
@ -1240,6 +1240,10 @@ void prepareTexture() {
|
|||||||
|
|
||||||
double xview, yview;
|
double xview, yview;
|
||||||
|
|
||||||
|
bool no_fog;
|
||||||
|
|
||||||
|
ld lowrug = 1e-2, hirug = 1e3;
|
||||||
|
|
||||||
void drawRugScene() {
|
void drawRugScene() {
|
||||||
glbuf->use_as_texture();
|
glbuf->use_as_texture();
|
||||||
|
|
||||||
@ -1275,7 +1279,7 @@ void drawRugScene() {
|
|||||||
xview = stereo::tanfov;
|
xview = stereo::tanfov;
|
||||||
yview = stereo::tanfov * vid.yres / vid.xres;
|
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;
|
xview = -xview; yview = -yview;
|
||||||
|
|
||||||
if(!rug_perspective)
|
if(!rug_perspective)
|
||||||
@ -1302,6 +1306,7 @@ void drawRugScene() {
|
|||||||
glhr::color2(0xFFFFFFFF);
|
glhr::color2(0xFFFFFFFF);
|
||||||
|
|
||||||
glhr::fog_max(
|
glhr::fog_max(
|
||||||
|
no_fog ? 1000 :
|
||||||
gwhere == gSphere && rug_perspective ? 10 :
|
gwhere == gSphere && rug_perspective ? 10 :
|
||||||
gwhere == gElliptic && rug_perspective ? 4 :
|
gwhere == gElliptic && rug_perspective ? 4 :
|
||||||
100
|
100
|
||||||
|
Loading…
Reference in New Issue
Block a user