mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-06 03:22:49 +00:00
3D:: affected by the FOV parameter
This commit is contained in:
parent
676abdf03b
commit
2ca3cf3744
@ -260,15 +260,21 @@ void display_data::set_projection(int ed, bool apply_models) {
|
|||||||
|
|
||||||
eyewidth_translate(ed);
|
eyewidth_translate(ed);
|
||||||
|
|
||||||
|
if(dim3) {
|
||||||
|
glhr::projection_multiply(glhr::frustum(current_display->tanfov, current_display->tanfov * vid.yres / vid.xres));
|
||||||
|
glhr::projection_multiply(glhr::scale(1, -1, -1));
|
||||||
|
current_display->scrdist_text = cd->ysize;
|
||||||
|
}
|
||||||
|
else {
|
||||||
glhr::projection_multiply(glhr::frustum(cd->xsize / cd->ysize, 1));
|
glhr::projection_multiply(glhr::frustum(cd->xsize / cd->ysize, 1));
|
||||||
|
|
||||||
GLfloat sc = current_display->radius / (cd->ysize/2.);
|
GLfloat sc = current_display->radius / (cd->ysize/2.);
|
||||||
|
|
||||||
glhr::projection_multiply(glhr::scale(sc, -sc, -1));
|
glhr::projection_multiply(glhr::scale(sc, -sc, -1));
|
||||||
|
current_display->scrdist_text = cd->ysize * sc / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(ed) glhr::projection_multiply(glhr::translate(vid.ipd * ed/2, 0, 0));
|
if(ed) glhr::projection_multiply(glhr::translate(vid.ipd * ed/2, 0, 0));
|
||||||
|
|
||||||
current_display->scrdist_text = cd->ysize * sc / 2;
|
|
||||||
|
|
||||||
if(dim3) {
|
if(dim3) {
|
||||||
glhr::fog_max(1/sightranges[geometry]);
|
glhr::fog_max(1/sightranges[geometry]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user