@luma.gl/webgl 9.0.0-alpha.30 → 9.0.0-alpha.32
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/adapter/converters/shader-formats.d.ts +9 -0
- package/dist/adapter/converters/shader-formats.d.ts.map +1 -0
- package/dist/adapter/converters/shader-formats.js +53 -0
- package/dist/adapter/converters/shader-formats.js.map +1 -0
- package/dist/adapter/converters/texture-formats.d.ts +1 -2
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
- package/dist/adapter/converters/texture-formats.js +2 -23
- package/dist/adapter/converters/texture-formats.js.map +1 -1
- package/dist/adapter/converters/vertex-formats.d.ts +8 -2
- package/dist/adapter/converters/vertex-formats.d.ts.map +1 -1
- package/dist/adapter/converters/vertex-formats.js +47 -9
- package/dist/adapter/converters/vertex-formats.js.map +1 -1
- package/dist/adapter/helpers/{uniforms.d.ts → decode-webgl-types.d.ts} +9 -8
- package/dist/adapter/helpers/decode-webgl-types.d.ts.map +1 -0
- package/dist/adapter/helpers/{uniforms.js → decode-webgl-types.js} +14 -13
- package/dist/adapter/helpers/decode-webgl-types.js.map +1 -0
- package/dist/adapter/helpers/get-shader-layout.d.ts +1 -51
- package/dist/adapter/helpers/get-shader-layout.d.ts.map +1 -1
- package/dist/adapter/helpers/get-shader-layout.js +14 -86
- package/dist/adapter/helpers/get-shader-layout.js.map +1 -1
- package/dist/adapter/helpers/set-uniform.d.ts +3 -2
- package/dist/adapter/helpers/set-uniform.d.ts.map +1 -1
- package/dist/adapter/helpers/set-uniform.js +25 -25
- package/dist/adapter/helpers/set-uniform.js.map +1 -1
- package/dist/adapter/helpers/{attribute-utils.d.ts → webgl-topology-utils.d.ts} +1 -1
- package/dist/adapter/helpers/webgl-topology-utils.d.ts.map +1 -0
- package/dist/adapter/helpers/{attribute-utils.js → webgl-topology-utils.js} +1 -1
- package/dist/adapter/helpers/webgl-topology-utils.js.map +1 -0
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts +2 -1
- package/dist/adapter/objects/webgl-vertex-array-object.d.ts.map +1 -1
- package/dist/adapter/objects/webgl-vertex-array-object.js.map +1 -1
- package/dist/adapter/resources/webgl-command-encoder.js +1 -1
- package/dist/adapter/resources/webgl-command-encoder.js.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.d.ts +16 -10
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +58 -59
- package/dist/adapter/resources/webgl-render-pipeline.js.map +1 -1
- package/dist/classic/buffer-with-accessor.d.ts +0 -1
- package/dist/classic/buffer-with-accessor.d.ts.map +1 -1
- package/dist/classic/buffer-with-accessor.js +0 -1
- package/dist/classic/buffer-with-accessor.js.map +1 -1
- package/dist/dist.dev.js +513 -418
- package/dist/index.cjs +670 -722
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist.min.js +22 -22
- package/package.json +5 -5
- package/src/adapter/converters/shader-formats.ts +41 -0
- package/src/adapter/converters/texture-formats.ts +3 -16
- package/src/adapter/converters/vertex-formats.ts +67 -10
- package/src/adapter/helpers/{uniforms.ts → decode-webgl-types.ts} +22 -17
- package/src/adapter/helpers/get-shader-layout.ts +51 -159
- package/src/adapter/helpers/set-uniform.ts +33 -33
- package/src/adapter/objects/webgl-vertex-array-object.ts +2 -1
- package/src/adapter/resources/webgl-command-encoder.ts +1 -1
- package/src/adapter/resources/webgl-render-pipeline.ts +125 -82
- package/src/classic/buffer-with-accessor.ts +0 -1
- package/src/index.ts +1 -1
- package/src/types.ts +2 -0
- package/dist/adapter/helpers/attribute-utils.d.ts.map +0 -1
- package/dist/adapter/helpers/attribute-utils.js.map +0 -1
- package/dist/adapter/helpers/uniforms.d.ts.map +0 -1
- package/dist/adapter/helpers/uniforms.js.map +0 -1
- /package/src/adapter/helpers/{attribute-utils.ts → webgl-topology-utils.ts} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
// luma.gl, MIT license
|
|
1
2
|
import type {
|
|
3
|
+
TypedArray,
|
|
4
|
+
UniformValue,
|
|
2
5
|
RenderPipelineProps,
|
|
3
|
-
RenderPass,
|
|
4
|
-
Buffer,
|
|
5
6
|
Binding,
|
|
6
7
|
ShaderLayout,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
AttributeLayout,
|
|
10
|
-
TypedArray,
|
|
11
|
-
BufferMapping
|
|
8
|
+
BufferLayout,
|
|
9
|
+
PrimitiveTopology
|
|
12
10
|
} from '@luma.gl/core';
|
|
13
|
-
import {
|
|
11
|
+
import type {RenderPass, Buffer} from '@luma.gl/core';
|
|
12
|
+
import {RenderPipeline, cast, log} from '@luma.gl/core';
|
|
13
|
+
import {mergeShaderLayout, getAttributeInfosFromLayouts} from '@luma.gl/core';
|
|
14
14
|
import {GL} from '@luma.gl/constants';
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
import {getShaderLayout
|
|
16
|
+
import {getGLFromVertexType} from '../converters/vertex-formats';
|
|
17
|
+
import {getShaderLayout} from '../helpers/get-shader-layout';
|
|
18
18
|
import {withDeviceParameters, withGLParameters} from '../converters/device-parameters';
|
|
19
19
|
import {setUniform} from '../helpers/set-uniform';
|
|
20
20
|
// import {copyUniform, checkUniformValues} from '../../classes/uniforms';
|
|
@@ -38,12 +38,12 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
38
38
|
vs: WEBGLShader;
|
|
39
39
|
/** fragment shader */
|
|
40
40
|
fs: WEBGLShader;
|
|
41
|
-
/** The merged layout */
|
|
42
|
-
layout: ShaderLayout;
|
|
43
41
|
/** The layout extracted from shader by WebGL introspection APIs */
|
|
44
42
|
introspectedLayout: ShaderLayout;
|
|
43
|
+
/** The merged layout */
|
|
44
|
+
shaderLayout: ShaderLayout;
|
|
45
45
|
/** Buffer map describing buffer interleaving etc */
|
|
46
|
-
|
|
46
|
+
bufferLayout: BufferLayout[];
|
|
47
47
|
|
|
48
48
|
/** Uniforms set on this model */
|
|
49
49
|
uniforms: Record<string, any> = {};
|
|
@@ -89,10 +89,10 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
89
89
|
|
|
90
90
|
this.introspectedLayout = getShaderLayout(this.device.gl, this.handle);
|
|
91
91
|
// Merge provided layout with introspected layout
|
|
92
|
-
this.
|
|
92
|
+
this.shaderLayout = mergeShaderLayout(this.introspectedLayout, props.shaderLayout);
|
|
93
93
|
// Merge layout with any buffer map overrides
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
94
|
+
this.bufferLayout = props.bufferLayout || [];
|
|
95
|
+
// this.shaderLayout = mergeBufferMap(this.shaderLayout, this.bufferLayout);
|
|
96
96
|
this.vertexArrayObject = new WEBGLVertexArrayObject(this.device);
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -111,32 +111,56 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/** @todo needed for portable model */
|
|
114
|
-
setAttributes(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
setAttributes(buffers: Record<string, Buffer>): void {
|
|
115
|
+
const attributeInfos = getAttributeInfosFromLayouts(this.shaderLayout, this.bufferLayout);
|
|
116
|
+
|
|
117
|
+
for (const [bufferName, buffer] of Object.entries(buffers)) {
|
|
118
|
+
let set = false;
|
|
119
|
+
for (const attributeInfo of Object.values(attributeInfos)) {
|
|
120
|
+
if (attributeInfo.bufferName !== bufferName) {
|
|
121
|
+
continue; // eslint-disable-line no-continue
|
|
122
|
+
}
|
|
123
|
+
const webglBuffer = cast<WEBGLBuffer>(buffer);
|
|
124
|
+
|
|
125
|
+
const glType = getGLFromVertexType(attributeInfo.bufferDataType);
|
|
126
|
+
// TODO remove when we have more confidence
|
|
127
|
+
log.log(1, {
|
|
128
|
+
setAttribute: attributeInfo.name,
|
|
129
|
+
toBuffer: bufferName,
|
|
130
|
+
size: attributeInfo.bufferComponents,
|
|
131
|
+
type: glType,
|
|
132
|
+
stride: attributeInfo.byteStride,
|
|
133
|
+
offset: attributeInfo.byteOffset,
|
|
134
|
+
normalized: attributeInfo.normalized,
|
|
135
|
+
// it is the shader attribute declaration, not the vertex memory format,
|
|
136
|
+
// that determines if the data in the buffer will be treated as integers.
|
|
137
|
+
// /
|
|
138
|
+
// Also note that WebGL supports assigning non-normalized integer data to floating point attributes,
|
|
139
|
+
// but as far as we can tell, WebGPU does not.
|
|
140
|
+
integer: attributeInfo.integer,
|
|
141
|
+
divisor: attributeInfo.stepMode === 'instance' ? 1 : 0
|
|
142
|
+
})();
|
|
143
|
+
this.vertexArrayObject.setBuffer(attributeInfo.location, webglBuffer, {
|
|
144
|
+
size: attributeInfo.bufferComponents,
|
|
145
|
+
type: glType,
|
|
146
|
+
stride: attributeInfo.byteStride,
|
|
147
|
+
offset: attributeInfo.byteOffset,
|
|
148
|
+
normalized: attributeInfo.normalized,
|
|
149
|
+
// it is the shader attribute declaration, not the vertex memory format,
|
|
150
|
+
// that determines if the data in the buffer will be treated as integers.
|
|
151
|
+
// /
|
|
152
|
+
// Also note that WebGL supports assigning non-normalized integer data to floating point attributes,
|
|
153
|
+
// but as far as we can tell, WebGPU does not.
|
|
154
|
+
integer: attributeInfo.integer,
|
|
155
|
+
divisor: attributeInfo.stepMode === 'instance' ? 1 : 0
|
|
156
|
+
});
|
|
157
|
+
set = true;
|
|
158
|
+
}
|
|
159
|
+
if (!set) {
|
|
160
|
+
log.warn(
|
|
161
|
+
`setAttributes(): Ignoring (buffer "${buffer.id}" for unknown attribute "${name}" in pipeline "${this.id}"`
|
|
162
|
+
)();
|
|
121
163
|
}
|
|
122
|
-
const decoded = decodeVertexFormat(attribute.format);
|
|
123
|
-
const {type: typeString, components: size, byteLength: stride, normalized /* , integer*/} = decoded;
|
|
124
|
-
const divisor = attribute.stepMode === 'instance' ? 1 : 0;
|
|
125
|
-
const type = getWebGLDataType(typeString);
|
|
126
|
-
this.vertexArrayObject.setBuffer(attribute.location, webglBuffer, {
|
|
127
|
-
size,
|
|
128
|
-
type,
|
|
129
|
-
stride,
|
|
130
|
-
offset: 0,
|
|
131
|
-
normalized,
|
|
132
|
-
// it is the shader attribute declaration, not the vertex memory format,
|
|
133
|
-
// that determines if the data in the buffer will be treated as integers.
|
|
134
|
-
// /
|
|
135
|
-
// Also note that WebGL supports assigning non-normalized integer data to floating point attributes,
|
|
136
|
-
// but as far as we can tell, WebGPU does not.
|
|
137
|
-
integer: false,
|
|
138
|
-
divisor
|
|
139
|
-
});
|
|
140
164
|
}
|
|
141
165
|
}
|
|
142
166
|
|
|
@@ -144,23 +168,26 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
144
168
|
* Constant attributes are only supported in WebGL, not in WebGPU
|
|
145
169
|
* Any attribute that is disabled in the current vertex array object
|
|
146
170
|
* is read from the context's global constant value for that attribute location.
|
|
147
|
-
* @param attributes
|
|
171
|
+
* @param attributes
|
|
148
172
|
*/
|
|
149
173
|
setConstantAttributes(attributes: Record<string, TypedArray>): void {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
174
|
+
// TODO - there should be no advantage to setting these here vs in _applyConstantAttributes
|
|
175
|
+
// for (const [name, value] of Object.entries(attributes)) {
|
|
176
|
+
// const attributeInfo = getAttributeInfosFromLayouts(this.shaderLayout, this.bufferLayout, name);
|
|
177
|
+
// if (!attributeInfo) {
|
|
178
|
+
// log.warn(
|
|
179
|
+
// `Ignoring constant value supplied for unknown attribute "${name}" in pipeline "${this.id}"`
|
|
180
|
+
// )();
|
|
181
|
+
// continue; // eslint-disable-line no-continue
|
|
182
|
+
// }
|
|
183
|
+
// this.vertexArrayObject.setConstant(attributeInfo.location, value);
|
|
184
|
+
// }
|
|
158
185
|
Object.assign(this.constantAttributes, attributes);
|
|
159
186
|
}
|
|
160
187
|
|
|
161
|
-
/**
|
|
188
|
+
/**
|
|
162
189
|
* Bindings include: textures, samplers and uniform buffers
|
|
163
|
-
* @todo needed for portable model
|
|
190
|
+
* @todo needed for portable model
|
|
164
191
|
*/
|
|
165
192
|
setBindings(bindings: Record<string, Binding>): void {
|
|
166
193
|
// if (log.priority >= 2) {
|
|
@@ -168,7 +195,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
168
195
|
// }
|
|
169
196
|
|
|
170
197
|
for (const [name, value] of Object.entries(bindings)) {
|
|
171
|
-
const binding = this.
|
|
198
|
+
const binding = this.shaderLayout.bindings.find(binding => binding.name === name);
|
|
172
199
|
if (!binding) {
|
|
173
200
|
log.warn(`Unknown binding ${name} in render pipeline ${this.id}`)();
|
|
174
201
|
continue; // eslint-disable-line no-continue
|
|
@@ -199,7 +226,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
199
226
|
}
|
|
200
227
|
}
|
|
201
228
|
|
|
202
|
-
setUniforms(uniforms: Record<string,
|
|
229
|
+
setUniforms(uniforms: Record<string, UniformValue>) {
|
|
203
230
|
// TODO - check against layout
|
|
204
231
|
Object.assign(this.uniforms, uniforms);
|
|
205
232
|
}
|
|
@@ -223,13 +250,13 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
223
250
|
vertexCount,
|
|
224
251
|
// indexCount,
|
|
225
252
|
instanceCount,
|
|
226
|
-
firstVertex = 0
|
|
253
|
+
firstVertex = 0
|
|
227
254
|
// firstIndex,
|
|
228
255
|
// firstInstance,
|
|
229
256
|
// baseVertex
|
|
230
257
|
} = options;
|
|
231
258
|
|
|
232
|
-
const drawMode =
|
|
259
|
+
const drawMode = getGLDrawMode(this.props.topology);
|
|
233
260
|
const isIndexed: boolean = Boolean(this._indexBuffer);
|
|
234
261
|
const indexType = this._indexBuffer?.glIndexType;
|
|
235
262
|
const isInstanced: boolean = Number(options.instanceCount) > 0;
|
|
@@ -277,7 +304,12 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
277
304
|
} else if (isIndexed) {
|
|
278
305
|
this.device.gl.drawElements(drawMode, vertexCount || 0, indexType, firstVertex); // indexCount?
|
|
279
306
|
} else if (isInstanced) {
|
|
280
|
-
this.device.gl2?.drawArraysInstanced(
|
|
307
|
+
this.device.gl2?.drawArraysInstanced(
|
|
308
|
+
drawMode,
|
|
309
|
+
firstVertex,
|
|
310
|
+
vertexCount || 0,
|
|
311
|
+
instanceCount || 0
|
|
312
|
+
);
|
|
281
313
|
} else {
|
|
282
314
|
this.device.gl.drawArrays(drawMode, firstVertex, vertexCount || 0);
|
|
283
315
|
}
|
|
@@ -344,7 +376,27 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
344
376
|
return texturesRenderable;
|
|
345
377
|
}
|
|
346
378
|
|
|
347
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Constant attributes need to be reset before every draw call
|
|
381
|
+
* Any attribute that is disabled in the current vertex array object
|
|
382
|
+
* is read from the context's global constant value for that attribute location.
|
|
383
|
+
* @note Constant attributes are only supported in WebGL, not in WebGPU
|
|
384
|
+
*/
|
|
385
|
+
_applyConstantAttributes(): void {
|
|
386
|
+
const attributeInfos = getAttributeInfosFromLayouts(this.shaderLayout, this.bufferLayout);
|
|
387
|
+
for (const [name, value] of Object.entries(this.constantAttributes)) {
|
|
388
|
+
const attributeInfo = attributeInfos[name];
|
|
389
|
+
if (!attributeInfo) {
|
|
390
|
+
log.warn(
|
|
391
|
+
`Ignoring constant value supplied for unknown attribute "${name}" in pipeline "${this.id}"`
|
|
392
|
+
)();
|
|
393
|
+
continue; // eslint-disable-line no-continue
|
|
394
|
+
}
|
|
395
|
+
this.vertexArrayObject.setConstant(attributeInfo.location, value);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/** Apply any bindings (before each draw call) */
|
|
348
400
|
_applyBindings() {
|
|
349
401
|
this.device.gl.useProgram(this.handle);
|
|
350
402
|
|
|
@@ -355,7 +407,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
355
407
|
|
|
356
408
|
let textureUnit = 0;
|
|
357
409
|
let uniformBufferIndex = 0;
|
|
358
|
-
for (const binding of this.
|
|
410
|
+
for (const binding of this.shaderLayout.bindings) {
|
|
359
411
|
const value = this.bindings[binding.name];
|
|
360
412
|
if (!value) {
|
|
361
413
|
throw new Error(`No value for binding ${binding.name} in ${this.id}`);
|
|
@@ -406,8 +458,12 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
406
458
|
}
|
|
407
459
|
}
|
|
408
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Due to program sharing, uniforms need to be reset before every draw call
|
|
463
|
+
* (though caching will avoid redundant WebGL calls)
|
|
464
|
+
*/
|
|
409
465
|
_applyUniforms() {
|
|
410
|
-
for (const uniformLayout of this.
|
|
466
|
+
for (const uniformLayout of this.shaderLayout.uniforms || []) {
|
|
411
467
|
const {name, location, type, textureUnit} = uniformLayout;
|
|
412
468
|
const value = this.uniforms[name] ?? textureUnit;
|
|
413
469
|
if (value !== undefined) {
|
|
@@ -415,28 +471,19 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
415
471
|
}
|
|
416
472
|
}
|
|
417
473
|
}
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Constant attributes are only supported in WebGL, not in WebGPU
|
|
421
|
-
* Any attribute that is disabled in the current vertex array object
|
|
422
|
-
* is read from the context's global constant value for that attribute location.
|
|
423
|
-
*/
|
|
424
|
-
_applyConstantAttributes(): void {
|
|
425
|
-
for (const [name, value] of Object.entries(this.constantAttributes)) {
|
|
426
|
-
const attribute = getAttributeLayout(this.layout, name);
|
|
427
|
-
if (!attribute) {
|
|
428
|
-
log.warn(`Ignoring constant value supplied for unknown attribute "${name}" in pipeline "${this.id}"`)();
|
|
429
|
-
continue; // eslint-disable-line no-continue
|
|
430
|
-
}
|
|
431
|
-
this.vertexArrayObject.setConstant(attribute.location, value);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
474
|
}
|
|
435
475
|
|
|
436
476
|
/** Get the primitive type for draw */
|
|
437
|
-
function
|
|
477
|
+
function getGLDrawMode(
|
|
438
478
|
topology: PrimitiveTopology
|
|
439
|
-
):
|
|
479
|
+
):
|
|
480
|
+
| GL.POINTS
|
|
481
|
+
| GL.LINES
|
|
482
|
+
| GL.LINE_STRIP
|
|
483
|
+
| GL.LINE_LOOP
|
|
484
|
+
| GL.TRIANGLES
|
|
485
|
+
| GL.TRIANGLE_STRIP
|
|
486
|
+
| GL.TRIANGLE_FAN {
|
|
440
487
|
// prettier-ignore
|
|
441
488
|
switch (topology) {
|
|
442
489
|
case 'point-list': return GL.POINTS;
|
|
@@ -464,7 +511,3 @@ function getGLPrimitive(topology: PrimitiveTopology): GL.POINTS | GL.LINES | GL.
|
|
|
464
511
|
default: throw new Error(topology);
|
|
465
512
|
}
|
|
466
513
|
}
|
|
467
|
-
|
|
468
|
-
function getAttributeLayout(layout: ShaderLayout, name: string): AttributeLayout | null {
|
|
469
|
-
return layout.attributes.find((binding) => binding.name === name) || null;
|
|
470
|
-
}
|
|
@@ -81,7 +81,6 @@ export type BufferWithAccessorProps = BufferProps & {
|
|
|
81
81
|
|
|
82
82
|
/** WebGL Buffer interface */
|
|
83
83
|
export class BufferWithAccessor extends WEBGLBuffer {
|
|
84
|
-
usage: number;
|
|
85
84
|
accessor: Accessor;
|
|
86
85
|
|
|
87
86
|
constructor(device: Device | WebGLRenderingContext, props?: BufferWithAccessorProps);
|
package/src/index.ts
CHANGED
|
@@ -73,7 +73,7 @@ export {
|
|
|
73
73
|
export {polyfillContext} from './context/polyfill/polyfill-context';
|
|
74
74
|
|
|
75
75
|
// HELPERS - EXPERIMENTAL
|
|
76
|
-
export {getShaderLayout
|
|
76
|
+
export {getShaderLayout} from './adapter/helpers/get-shader-layout';
|
|
77
77
|
export {convertGLToTextureFormat, _checkFloat32ColorAttachment} from './adapter/converters/texture-formats';
|
|
78
78
|
|
|
79
79
|
// TEST EXPORTS
|
package/src/types.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-utils.d.ts","sourceRoot":"","sources":["../../../src/adapter/helpers/attribute-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,mBAAmB,EAAE,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAGxE,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,WAAW,CAmB/E;AAGD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IAAC,QAAQ,EAAE,mBAAmB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,GAAG,MAAM,CAkBvG;AAGD,wBAAgB,cAAc,CAAC,OAAO,EAAE;IAAC,QAAQ,EAAE,mBAAmB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,GAAG,MAAM,CAapG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-utils.js","names":["GL","getPrimitiveDrawMode","drawMode","POINTS","LINES","LINE_STRIP","LINE_LOOP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","Error","getPrimitiveCount","options","vertexCount","getVertexCount","primitiveCount"],"sources":["../../../src/adapter/helpers/attribute-utils.ts"],"sourcesContent":["import {GL, GLPrimitiveTopology, GLPrimitive} from '@luma.gl/constants';\n\n// Counts the number of complete primitives given a number of vertices and a drawMode\nexport function getPrimitiveDrawMode(drawMode: GLPrimitiveTopology): GLPrimitive {\n switch (drawMode) {\n case GL.POINTS:\n return GL.POINTS;\n case GL.LINES:\n return GL.LINES;\n case GL.LINE_STRIP:\n return GL.LINES;\n case GL.LINE_LOOP:\n return GL.LINES;\n case GL.TRIANGLES:\n return GL.TRIANGLES;\n case GL.TRIANGLE_STRIP:\n return GL.TRIANGLES;\n case GL.TRIANGLE_FAN:\n return GL.TRIANGLES;\n default:\n throw new Error('drawMode');\n }\n}\n\n// Counts the number of complete \"primitives\" given a number of vertices and a drawMode\nexport function getPrimitiveCount(options: {drawMode: GLPrimitiveTopology, vertexCount: number}): number {\n const {drawMode, vertexCount} = options;\n switch (drawMode) {\n case GL.POINTS:\n case GL.LINE_LOOP:\n return vertexCount;\n case GL.LINES:\n return vertexCount / 2;\n case GL.LINE_STRIP:\n return vertexCount - 1;\n case GL.TRIANGLES:\n return vertexCount / 3;\n case GL.TRIANGLE_STRIP:\n case GL.TRIANGLE_FAN:\n return vertexCount - 2;\n default:\n throw new Error('drawMode');\n }\n}\n\n// Counts the number of vertices after splitting the vertex stream into separate \"primitives\"\nexport function getVertexCount(options: {drawMode: GLPrimitiveTopology, vertexCount: number}): number {\n const {drawMode, vertexCount} = options;\n const primitiveCount = getPrimitiveCount({drawMode, vertexCount});\n switch (getPrimitiveDrawMode(drawMode)) {\n case GL.POINTS:\n return primitiveCount;\n case GL.LINES:\n return primitiveCount * 2;\n case GL.TRIANGLES:\n return primitiveCount * 3;\n default:\n throw new Error('drawMode');\n }\n}\n"],"mappings":"AAAA,SAAQA,EAAE,QAAyC,oBAAoB;AAGvE,OAAO,SAASC,oBAAoBA,CAACC,QAA6B,EAAe;EAC/E,QAAQA,QAAQ;IACd,KAAKF,EAAE,CAACG,MAAM;MACZ,OAAOH,EAAE,CAACG,MAAM;IAClB,KAAKH,EAAE,CAACI,KAAK;MACX,OAAOJ,EAAE,CAACI,KAAK;IACjB,KAAKJ,EAAE,CAACK,UAAU;MAChB,OAAOL,EAAE,CAACI,KAAK;IACjB,KAAKJ,EAAE,CAACM,SAAS;MACf,OAAON,EAAE,CAACI,KAAK;IACjB,KAAKJ,EAAE,CAACO,SAAS;MACf,OAAOP,EAAE,CAACO,SAAS;IACrB,KAAKP,EAAE,CAACQ,cAAc;MACpB,OAAOR,EAAE,CAACO,SAAS;IACrB,KAAKP,EAAE,CAACS,YAAY;MAClB,OAAOT,EAAE,C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EAAC,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,EAAE,EAAE,aAAa,EAAiB,eAAe,EAAE,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEjG,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAE7D;AA0DD,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,EAAE,GACd;IAAC,MAAM,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAC,CAOjE;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,EAAE,GAAG;IACtD,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;CACpB,CAOA;AAED,0FAA0F;AAC1F,wBAAgB,4BAA4B,CAC1C,mBAAmB,EAAE,eAAe,GACnC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CAO/C;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,KAAA,GAAG;IAAC,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG,IAAI,CAkBtG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniforms.js","names":["GL","isSamplerUniform","type","SAMPLER_TYPES","includes","SAMPLER_2D","SAMPLER_CUBE","SAMPLER_3D","SAMPLER_2D_SHADOW","SAMPLER_2D_ARRAY","SAMPLER_2D_ARRAY_SHADOW","SAMPLER_CUBE_SHADOW","INT_SAMPLER_2D","INT_SAMPLER_3D","INT_SAMPLER_CUBE","INT_SAMPLER_2D_ARRAY","UNSIGNED_INT_SAMPLER_2D","UNSIGNED_INT_SAMPLER_3D","UNSIGNED_INT_SAMPLER_CUBE","UNSIGNED_INT_SAMPLER_2D_ARRAY","COMPOSITE_GL_TYPES","FLOAT","FLOAT_VEC2","FLOAT_VEC3","FLOAT_VEC4","INT","INT_VEC2","INT_VEC3","INT_VEC4","UNSIGNED_INT","UNSIGNED_INT_VEC2","UNSIGNED_INT_VEC3","UNSIGNED_INT_VEC4","BOOL","BOOL_VEC2","BOOL_VEC3","BOOL_VEC4","FLOAT_MAT2","FLOAT_MAT2x3","FLOAT_MAT2x4","FLOAT_MAT3x2","FLOAT_MAT3","FLOAT_MAT3x4","FLOAT_MAT4x2","FLOAT_MAT4x3","FLOAT_MAT4","decodeUniformType","uniformType","typeAndSize","Error","glType","components","format","decodeAttributeType","attributeType","decomposeCompositeGLDataType","compositeGLDataType","getCompositeGLDataType","BYTE","UNSIGNED_BYTE","SHORT","UNSIGNED_SHORT","compType","compComponents","name","Number"],"sources":["../../../src/adapter/helpers/uniforms.ts"],"sourcesContent":["import {UniformFormat, VertexFormat} from '@luma.gl/core';\nimport {GL, GLUniformType, GLSamplerType, GLCompositeType, GLDataType} from '@luma.gl/constants';\n\n/** Check is uniform is of sampler type */\nexport function isSamplerUniform(type: GLUniformType): boolean {\n return SAMPLER_TYPES.includes(type as GLSamplerType);\n}\n\nconst SAMPLER_TYPES: GLSamplerType[] = [\n GL.SAMPLER_2D,\n GL.SAMPLER_CUBE,\n GL.SAMPLER_3D,\n GL.SAMPLER_2D_SHADOW,\n GL.SAMPLER_2D_ARRAY,\n GL.SAMPLER_2D_ARRAY_SHADOW,\n GL.SAMPLER_CUBE_SHADOW,\n GL.INT_SAMPLER_2D,\n GL.INT_SAMPLER_3D,\n GL.INT_SAMPLER_CUBE,\n GL.INT_SAMPLER_2D_ARRAY,\n GL.UNSIGNED_INT_SAMPLER_2D,\n GL.UNSIGNED_INT_SAMPLER_3D,\n GL.UNSIGNED_INT_SAMPLER_CUBE,\n GL.UNSIGNED_INT_SAMPLER_2D_ARRAY\n];\n\n// Composite types table\nconst COMPOSITE_GL_TYPES: Record<\n GLCompositeType,\n [GLDataType, number, string, UniformFormat, VertexFormat?]\n> = {\n [GL.FLOAT]: [GL.FLOAT, 1, 'float', 'f32', 'float32'],\n [GL.FLOAT_VEC2]: [GL.FLOAT, 2, 'vec2', 'vec2<f32>', 'float32x2'],\n [GL.FLOAT_VEC3]: [GL.FLOAT, 3, 'vec3', 'vec3<f32>', 'float32x3'],\n [GL.FLOAT_VEC4]: [GL.FLOAT, 4, 'vec4', 'vec4<f32>', 'float32x4'],\n\n [GL.INT]: [GL.INT, 1, 'int', 'i32', 'sint32'],\n [GL.INT_VEC2]: [GL.INT, 2, 'ivec2', 'vec2<i32>', 'sint32x2'],\n [GL.INT_VEC3]: [GL.INT, 3, 'ivec3', 'vec3<i32>', 'sint32x3'],\n [GL.INT_VEC4]: [GL.INT, 4, 'ivec4', 'vec4<i32>', 'sint32x4'],\n\n [GL.UNSIGNED_INT]: [GL.UNSIGNED_INT, 1, 'uint', 'u32', 'uint32'],\n [GL.UNSIGNED_INT_VEC2]: [GL.UNSIGNED_INT, 2, 'uvec2', 'vec2<u32>', 'uint32x2'],\n [GL.UNSIGNED_INT_VEC3]: [GL.UNSIGNED_INT, 3, 'uvec3', 'vec3<u32>', 'uint32x3'],\n [GL.UNSIGNED_INT_VEC4]: [GL.UNSIGNED_INT, 4, 'uvec4', 'vec4<u32>', 'uint32x4'],\n\n [GL.BOOL]: [GL.FLOAT, 1, 'bool', 'f32', 'float32x2'],\n [GL.BOOL_VEC2]: [GL.FLOAT, 2, 'bvec2', 'vec2<f32>'],\n [GL.BOOL_VEC3]: [GL.FLOAT, 3, 'bvec3', 'vec3<f32>'],\n [GL.BOOL_VEC4]: [GL.FLOAT, 4, 'bvec4', 'vec4<f32>'],\n\n [GL.FLOAT_MAT2]: [GL.FLOAT, 8, 'mat2', 'mat2x2<f32>'], // 4\n [GL.FLOAT_MAT2x3]: [GL.FLOAT, 8, 'mat2x3', 'mat2x3<f32>'], // 6\n [GL.FLOAT_MAT2x4]: [GL.FLOAT, 8, 'mat2x4', 'mat2x4<f32>'], // 8\n\n [GL.FLOAT_MAT3x2]: [GL.FLOAT, 12, 'mat3x2', 'mat3x2<f32>'], // 6\n [GL.FLOAT_MAT3]: [GL.FLOAT, 12, 'mat3', 'mat3x3<f32>'], // 9\n [GL.FLOAT_MAT3x4]: [GL.FLOAT, 12, 'mat3x4', 'mat3x4<f32>'], // 12\n\n [GL.FLOAT_MAT4x2]: [GL.FLOAT, 16, 'mat4x2', 'mat4x2<f32>'], // 8\n [GL.FLOAT_MAT4x3]: [GL.FLOAT, 16, 'mat4x3', 'mat4x3<f32>'], // 12\n [GL.FLOAT_MAT4]: [GL.FLOAT, 16, 'mat4', 'mat4x4<f32>'] // 16\n};\n\n/** Decomposes a composite type GL.VEC3 into a basic type (GL.FLOAT) and components (3) */\nexport function decodeUniformType(\n uniformType: GL\n): {format: UniformFormat; components: number; glType: GLDataType} {\n const typeAndSize = COMPOSITE_GL_TYPES[uniformType];\n if (!typeAndSize) {\n throw new Error('uniform');\n }\n const [glType, components, , format] = typeAndSize;\n return {format, components, glType};\n}\n\nexport function decodeAttributeType(attributeType: GL): {\n format: VertexFormat;\n components: number;\n glType: GLDataType;\n} {\n const typeAndSize = COMPOSITE_GL_TYPES[attributeType];\n if (!typeAndSize) {\n throw new Error('attribute')\n }\n const [glType, components, , , format] = typeAndSize;\n return {format, components, glType};\n}\n\n/** Decomposes a composite type GL.VEC3 into a basic type (GL.FLOAT) and components (3) */\nexport function decomposeCompositeGLDataType(\n compositeGLDataType: GLCompositeType\n): {type: GLDataType; components: number} | null {\n const typeAndSize = COMPOSITE_GL_TYPES[compositeGLDataType];\n if (!typeAndSize) {\n return null;\n }\n const [type, components] = typeAndSize;\n return {type, components};\n}\n\nexport function getCompositeGLDataType(type: GL, components): {glType: GLDataType; name: string} | null {\n switch (type) {\n case GL.BYTE:\n case GL.UNSIGNED_BYTE:\n case GL.SHORT:\n case GL.UNSIGNED_SHORT:\n type = GL.FLOAT;\n break;\n default:\n }\n\n for (const glType in COMPOSITE_GL_TYPES) {\n const [compType, compComponents, name] = COMPOSITE_GL_TYPES[glType];\n if (compType === type && compComponents === components) {\n return {glType: Number(glType), name};\n }\n }\n return null;\n}\n"],"mappings":"AACA,SAAQA,EAAE,QAAkE,oBAAoB;AAGhG,OAAO,SAASC,gBAAgBA,CAACC,IAAmB,EAAW;EAC7D,OAAOC,aAAa,CAACC,QAAQ,CAACF,IAAqB,CAAC;AACtD;AAEA,MAAMC,aAA8B,GAAG,CACrCH,EAAE,CAACK,UAAU,EACbL,EAAE,CAACM,YAAY,EACfN,EAAE,CAACO,UAAU,EACbP,EAAE,CAACQ,iBAAiB,EACpBR,EAAE,CAACS,gBAAgB,EACnBT,EAAE,CAACU,uBAAuB,EAC1BV,EAAE,CAACW,mBAAmB,EACtBX,EAAE,CAACY,cAAc,EACjBZ,EAAE,CAACa,cAAc,EACjBb,EAAE,CAACc,gBAAgB,EACnBd,EAAE,CAACe,oBAAoB,EACvBf,EAAE,CAACgB,uBAAuB,EAC1BhB,EAAE,CAACiB,uBAAuB,EAC1BjB,EAAE,CAACkB,yBAAyB,EAC5BlB,EAAE,CAACmB,6BAA6B,CACjC;AAGD,MAAMC,kBAGL,GAAG;EACF,CAACpB,EAAE,CAACqB,KAAK,GAAG,CAACrB,EAAE,CAACqB,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC;EACpD,CAACrB,EAAE,CAACsB,UAAU,GAAG,CAACtB,EAAE,CAACqB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;EAChE,CAACrB,EAAE,CAACuB,UAAU,GAAG,CAACvB,EAAE,CAACqB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;EAChE,CAACrB,EAAE,CAACwB,UAAU,GAAG,CAACxB,EAAE,CAACqB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;EAEhE,CAACrB,EAAE,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