Fix equirect shader;

This commit is contained in:
bjorn 2022-08-12 22:46:59 -07:00
parent 401ec05d00
commit efdbc7f7ba
1 changed files with 1 additions and 3 deletions

View File

@ -4,10 +4,8 @@
#include "lovr.glsl"
layout(location = 0) in vec3 Direction;
vec4 lovrmain() {
vec3 dir = normalize(Direction);
vec3 dir = normalize(Normal);
float phi = acos(dir.y);
float theta = atan(dir.x, -dir.z);
vec2 uv = vec2(.5 + theta / (2 * PI), phi / PI);