1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 02:07:57 +00:00

ray:: set depth to match primitive-based shader

This commit is contained in:
Zeno Rogue
2019-10-26 14:11:44 +02:00
parent 852c45e429
commit 3c4fe13fac
2 changed files with 34 additions and 4 deletions

View File

@@ -180,7 +180,12 @@ EX glmatrix& as_glmatrix(GLfloat o[16]) {
return tmp;
}
EX glmatrix frustum(ld x, ld y, ld vnear IS(1e-3), ld vfar IS(1e9)) {
#if HDR
constexpr ld vnear_default = 1e-3;
constexpr ld vfar_default = 1e9;
#endif
EX glmatrix frustum(ld x, ld y, ld vnear IS(vnear_default), ld vfar IS(vfar_default)) {
GLfloat frustum[16] = {
GLfloat(1 / x), 0, 0, 0,
0, GLfloat(1 / y), 0, 0,