1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-27 13:48:15 +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 -= dot(vec4(-position.xyz, position.w), tangent) * position;\n"
"tangent /= sqrt(dot(tangent.xyz, tangent.xyz) - tangent.w*tangent.w);\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()) { if(hyperbolic && bt::in()) {
fmain += fmain +=
"if(which == 20) {\n" "if(which == 20) {\n"