@quake2ts/engine 0.0.810 → 0.0.813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.global.js +14 -1
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +14 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +14 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/render/skybox.d.ts +1 -1
- package/dist/types/render/skybox.d.ts.map +1 -1
- package/dist/types/render/webgpu/pipelines/skybox.d.ts +4 -1
- package/dist/types/render/webgpu/pipelines/skybox.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -5781,7 +5781,20 @@ uniform vec2 u_scroll;
|
|
|
5781
5781
|
out vec3 v_direction;
|
|
5782
5782
|
|
|
5783
5783
|
void main() {
|
|
5784
|
-
|
|
5784
|
+
// Transform Quake-space position/direction to GL-space direction for cubemap sampling.
|
|
5785
|
+
// Quake Basis: X(Fwd), Y(Left), Z(Up)
|
|
5786
|
+
// GL Basis (Cubemap): -Z(Front), -X(Left), +Y(Top)
|
|
5787
|
+
// Mapping:
|
|
5788
|
+
// Quake X (1,0,0) -> GL -Z (0,0,-1)
|
|
5789
|
+
// Quake Y (0,1,0) -> GL -X (-1,0,0)
|
|
5790
|
+
// Quake Z (0,0,1) -> GL Y (0,1,0)
|
|
5791
|
+
vec3 dir = vec3(-a_position.y, a_position.z, -a_position.x);
|
|
5792
|
+
|
|
5793
|
+
// Normalize just in case, though a_position is on a cube surface.
|
|
5794
|
+
// Actually, for a cubemap lookup, normalization isn't strictly required by the hardware
|
|
5795
|
+
// (it grabs the vector direction), but good practice if we modify it.
|
|
5796
|
+
dir = normalize(dir);
|
|
5797
|
+
|
|
5785
5798
|
dir.xy += u_scroll;
|
|
5786
5799
|
v_direction = dir;
|
|
5787
5800
|
gl_Position = u_viewProjectionNoTranslation * vec4(a_position, 1.0);
|