1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-17 18:59:59 +00:00

ray:: fix matrix in h2xe

This commit is contained in:
Zeno Rogue 2020-10-26 12:02:24 +01:00
parent 77d16fdc3d
commit bcbe154b3a

View File

@ -981,6 +981,11 @@ void enable_raycaster() {
"tangent -= dot(vec4(-position.xyz, position.w), tangent) * position;\n"
"tangent /= sqrt(dot(tangent.xyz, tangent.xyz) - tangent.w*tangent.w);\n";
if(in_h2xe()) fmain +=
"position /= sqrt(position.z*position.z - dot(position.xy, position.xy));\n"
"tangent -= dot(vec3(-position.xy, position.z), tangent.xyz) * position;\n"
"tangent /= sqrt(dot(tangent.xy, tangent.xy) - tangent.z*tangent.z);\n";
if(hyperbolic && bt::in()) {
fmain +=
"if(which == 20) {\n"