quake2ts 0.0.510 → 0.0.512
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/package.json +1 -1
- package/packages/client/dist/browser/index.global.js +5 -1
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/client/dist/cjs/index.cjs +5 -1
- package/packages/client/dist/cjs/index.cjs.map +1 -1
- package/packages/client/dist/esm/index.js +5 -1
- package/packages/client/dist/esm/index.js.map +1 -1
- package/packages/client/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/engine/dist/browser/index.global.js +13 -9
- package/packages/engine/dist/browser/index.global.js.map +1 -1
- package/packages/engine/dist/cjs/index.cjs +9 -2
- package/packages/engine/dist/cjs/index.cjs.map +1 -1
- package/packages/engine/dist/esm/index.js +9 -2
- package/packages/engine/dist/esm/index.js.map +1 -1
- package/packages/engine/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/engine/dist/types/render/bspPipeline.d.ts +3 -1
- package/packages/engine/dist/types/render/bspPipeline.d.ts.map +1 -1
- package/packages/engine/dist/types/render/frame.d.ts +1 -0
- package/packages/engine/dist/types/render/frame.d.ts.map +1 -1
- package/packages/engine/dist/types/render/renderer.d.ts.map +1 -1
- package/packages/game/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -6134,6 +6134,7 @@ uniform vec4 u_styleLayerMapping; // 0, 1, 2... or -1 if invalid
|
|
|
6134
6134
|
uniform float u_alpha;
|
|
6135
6135
|
uniform bool u_applyLightmap;
|
|
6136
6136
|
uniform bool u_warp;
|
|
6137
|
+
uniform bool u_lightmapOnly;
|
|
6137
6138
|
uniform float u_time;
|
|
6138
6139
|
|
|
6139
6140
|
uniform int u_renderMode; // 0: Textured, 1: Solid, 2: Solid Faceted
|
|
@@ -6149,7 +6150,10 @@ void main() {
|
|
|
6149
6150
|
|
|
6150
6151
|
if (u_renderMode == 0) {
|
|
6151
6152
|
// TEXTURED MODE
|
|
6152
|
-
vec4 base =
|
|
6153
|
+
vec4 base = vec4(1.0);
|
|
6154
|
+
if (!u_lightmapOnly) {
|
|
6155
|
+
base = texture(u_diffuseMap, v_texCoord);
|
|
6156
|
+
}
|
|
6153
6157
|
|
|
6154
6158
|
vec3 totalLight = vec3(1.0);
|
|
6155
6159
|
|
|
@@ -6266,6 +6270,7 @@ var BspSurfacePipeline = class {
|
|
|
6266
6270
|
this.uniformAlpha = this.program.getUniformLocation("u_alpha");
|
|
6267
6271
|
this.uniformApplyLightmap = this.program.getUniformLocation("u_applyLightmap");
|
|
6268
6272
|
this.uniformWarp = this.program.getUniformLocation("u_warp");
|
|
6273
|
+
this.uniformLightmapOnly = this.program.getUniformLocation("u_lightmapOnly");
|
|
6269
6274
|
this.uniformDiffuse = this.program.getUniformLocation("u_diffuseMap");
|
|
6270
6275
|
this.uniformLightmap = this.program.getUniformLocation("u_lightmapAtlas");
|
|
6271
6276
|
this.uniformTime = this.program.getUniformLocation("u_time");
|
|
@@ -6294,7 +6299,8 @@ var BspSurfacePipeline = class {
|
|
|
6294
6299
|
alpha,
|
|
6295
6300
|
warp,
|
|
6296
6301
|
dlights = [],
|
|
6297
|
-
renderMode
|
|
6302
|
+
renderMode,
|
|
6303
|
+
lightmapOnly
|
|
6298
6304
|
} = options;
|
|
6299
6305
|
const state = deriveSurfaceRenderState(surfaceFlags, timeSeconds);
|
|
6300
6306
|
const styles = resolveLightStyles(styleIndices, styleValues);
|
|
@@ -6312,6 +6318,7 @@ var BspSurfacePipeline = class {
|
|
|
6312
6318
|
const applyLightmap = !state.sky && lightmapSampler !== void 0 && !finalWarp;
|
|
6313
6319
|
this.gl.uniform1i(this.uniformApplyLightmap, applyLightmap ? 1 : 0);
|
|
6314
6320
|
this.gl.uniform1i(this.uniformWarp, finalWarp ? 1 : 0);
|
|
6321
|
+
this.gl.uniform1i(this.uniformLightmapOnly, lightmapOnly ? 1 : 0);
|
|
6315
6322
|
this.gl.uniform1f(this.uniformTime, timeSeconds);
|
|
6316
6323
|
this.gl.uniform1i(this.uniformDiffuse, diffuseSampler);
|
|
6317
6324
|
this.gl.uniform1i(this.uniformLightmap, lightmapSampler ?? 0);
|