mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-16 11:08:05 +00:00
PSL(2,R)
This commit is contained in:
@@ -53,7 +53,7 @@ glvertex pointtogl(const hyperpoint& t);
|
||||
enum class shader_projection { standard, band, halfplane, standardH3, standardR3,
|
||||
standardS30, standardS31, standardS32, standardS33,
|
||||
ball, halfplane3, band3, flatten, standardSolv, standardNil,
|
||||
standardEH2,
|
||||
standardEH2, standardSL2,
|
||||
MAX
|
||||
};
|
||||
|
||||
@@ -635,6 +635,7 @@ void init() {
|
||||
bool sh3 = (sp == shader_projection::standardH3);
|
||||
bool ssol = (sp == shader_projection::standardSolv);
|
||||
bool snil = (sp == shader_projection::standardNil);
|
||||
bool ssl2 = (sp == shader_projection::standardSL2);
|
||||
bool sr3 = (sp == shader_projection::standardR3);
|
||||
bool ss30 = (sp == shader_projection::standardS30);
|
||||
bool ss31 = (sp == shader_projection::standardS31);
|
||||
@@ -643,7 +644,7 @@ void init() {
|
||||
bool seh2 = (sp == shader_projection::standardEH2);
|
||||
bool ss3 = ss30 || ss31 || ss32 || ss33;
|
||||
|
||||
bool s3 = (sh3 || sr3 || ss3 || ssol || snil || seh2);
|
||||
bool s3 = (sh3 || sr3 || ss3 || ssol || snil || seh2 || ssl2);
|
||||
bool dim3 = s3 || among(sp, shader_projection::ball, shader_projection::halfplane3, shader_projection::band3);
|
||||
bool dim2 = !dim3;
|
||||
bool ball = (sp == shader_projection::ball);
|
||||
@@ -697,6 +698,7 @@ void init() {
|
||||
|
||||
ssol, solv::solshader,
|
||||
snil, nilv::nilshader,
|
||||
ssl2, slr::slshader,
|
||||
|
||||
1, "void main() {",
|
||||
texture, "vTexCoord = aTexture;",
|
||||
@@ -736,6 +738,7 @@ void init() {
|
||||
ssol, "float ad = (d == 0.) ? 0. : (d < 1.) ? min(atanh(d), 10.) : 10.; ",
|
||||
ssol, "float m = ad / d / 11.; t[0] *= m; t[1] *= m; t[2] *= m; ",
|
||||
snil, "t = inverse_exp(t);",
|
||||
ssl2, "t = inverse_exp(t);",
|
||||
|
||||
seh2, "float z = log(t[2] * t[2] - t[0] * t[0] - t[1] * t[1]) / 2.;",
|
||||
seh2, "float r = sqrt(t[0] * t[0] + t[1] * t[1]);",
|
||||
@@ -747,7 +750,7 @@ void init() {
|
||||
seh2, "t[2] = z;",
|
||||
|
||||
sh3, "float fogs = (uFogBase - acosh(t[3]) / uFog);",
|
||||
sr3||snil, "float fogs = (uFogBase - sqrt(t[0]*t[0] + t[1]*t[1] + t[2]*t[2]) / uFog);",
|
||||
sr3||snil||ssl2, "float fogs = (uFogBase - sqrt(t[0]*t[0] + t[1]*t[1] + t[2]*t[2]) / uFog);",
|
||||
ssol, "float fogs = (uFogBase - ad / uFog);",
|
||||
|
||||
seh2, "float fogs = (uFogBase - sqrt(z*z+d*d) / uFog);",
|
||||
|
||||
Reference in New Issue
Block a user