You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/nbl/builtin/glsl/ies/functions.glsl
+22-14Lines changed: 22 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,33 @@
6
6
7
7
#include <nbl/builtin/glsl/math/constants.glsl>
8
8
9
-
// TODO: implement proper mirroing
10
-
// MIRROR_180_BITS = 0b001, Last Angle is 180, so map V slightly differently
11
-
// MIRROR_90_BITS = 0b010, Last Angle is 90, so map both U and V slightly differently
12
-
// ISOTROPIC_BITS = 0b011, texture to sample is Nx1, pretend v=middle always
13
-
// FULL_THETA_BIT = 0b100, handle extended domain and rotate by 45 degrees for anisotropic
14
-
15
-
vec2 nbl_glsl_IES_convert_dir_to_uv(vec3 dir) {
16
-
float sum =dot(vec3(1.0f), abs(dir));
9
+
// TODO: when rewriting to HLSL this is not IES namespace or folder, this should be octahedral mapping sitting somewhere where the spherical/polar sits
10
+
// NOTE: I changed it to return NDC [-1,1]^2 instead of UV coords [0,1]^2
0 commit comments