1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-13 04:13:03 +00:00

primitive-based rendering of the Berger sphere (very poor)

This commit is contained in:
Zeno Rogue
2020-07-24 23:39:30 +02:00
parent 2dff2df4fe
commit 94cac21716
5 changed files with 221 additions and 7 deletions

View File

@@ -248,7 +248,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
shader_flags |= SF_PERS3 | SF_DIRECT;
if(hyperbolic)
distfun = "acosh(t[3])", treset = true;
else if(euclid || nonisotropic)
else if(euclid || nonisotropic || stretch::in() || (sphere && ray::in_use))
distfun = "length(t.xyz)", treset = true;
else {
if(spherephase & 4) coordinator += "t = -t;\n";