1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 04:17:39 +00:00

3D:: sightranges are now configurable

This commit is contained in:
?
2019-02-25 17:21:53 +01:00
committed by Zeno Rogue
parent 46250081ec
commit fb71d4fd15
6 changed files with 35 additions and 21 deletions

View File

@@ -564,12 +564,12 @@ void init() {
s3, "vec4 t = uMV * aPosition;",
sh3, "vColor.xyz = vColor.xyz * (1.0 - acosh(t[3]) / uFog);",
sr3, "vColor.xyz = vColor.xyz * (1.0 - sqrt(t[0]*t[0] + t[1]*t[1] + t[2]*t[2]) / 7.);",
sr3, "vColor.xyz = vColor.xyz * (1.0 - sqrt(t[0]*t[0] + t[1]*t[1] + t[2]*t[2]) / uFog);",
ss30, "vColor.xyz = vColor.xyz * (acos(t[3]) / 6.3); t = -t; ",
ss31, "vColor.xyz = vColor.xyz * (acos(t[3]) / 6.3); t.xyz = -t.xyz; ",
ss32, "vColor.xyz = vColor.xyz * (1.0 - acos(t[3]) / 6.3); t.w = -t.w; ",
ss33, "vColor.xyz = vColor.xyz * (1.0 - acos(t[3]) / 6.3); ",
ss30, "vColor.xyz = vColor.xyz * (1 - (6.284 - acos(t[3])) / uFog); t = -t; ",
ss31, "vColor.xyz = vColor.xyz * (1 - (6.284 - acos(t[3])) / uFog); t.xyz = -t.xyz; ",
ss32, "vColor.xyz = vColor.xyz * (1 - acos(t[3]) / uFog); t.w = -t.w; ", // 2pi
ss33, "vColor.xyz = vColor.xyz * (1 - acos(t[3]) / uFog); ",
sh3 || sr3,"t[3] = 1.0;",
band || hp || s3,"gl_Position = uP * t;",