forked from playcanvas/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphics.js
More file actions
765 lines (737 loc) · 24.9 KB
/
graphics.js
File metadata and controls
765 lines (737 loc) · 24.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
(function () {
// Graphics engine enums
var enums = {
/**
* @static
* @readonly
* @type Number
* @name pc.ADDRESS_REPEAT
* @description Ignores the integer part of texture coordinates, using only the fractional part.
*/
ADDRESS_REPEAT: 0,
/**
* @static
* @readonly
* @type Number
* @name pc.ADDRESS_CLAMP_TO_EDGE
* @description Clamps texture coordinate to the range 0 to 1.
*/
ADDRESS_CLAMP_TO_EDGE: 1,
/**
* @static
* @readonly
* @type Number
* @name pc.ADDRESS_MIRRORED_REPEAT
* @description Texture coordinate to be set to the fractional part if the integer part is even; if the integer part is odd,
* then the texture coordinate is set to 1 minus the fractional part.
*/
ADDRESS_MIRRORED_REPEAT: 2,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ZERO
* @description Multiply all fragment components by zero.
*/
BLENDMODE_ZERO: 0,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ONE
* @description Multiply all fragment components by one.
*/
BLENDMODE_ONE: 1,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_SRC_COLOR
* @description Multiply all fragment components by the components of the source fragment.
*/
BLENDMODE_SRC_COLOR: 2,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ONE_MINUS_SRC_COLOR
* @description Multiply all fragment components by one minus the components of the source fragment.
*/
BLENDMODE_ONE_MINUS_SRC_COLOR: 3,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_DST_COLOR
* @description Multiply all fragment components by the components of the destination fragment.
*/
BLENDMODE_DST_COLOR: 4,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ONE_MINUS_DST_COLOR
* @description Multiply all fragment components by one minus the components of the destination fragment.
*/
BLENDMODE_ONE_MINUS_DST_COLOR: 5,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_SRC_ALPHA
* @description Multiply all fragment components by the alpha value of the source fragment.
*/
BLENDMODE_SRC_ALPHA: 6,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_SRC_ALPHA_SATURATE
* @description Multiply all fragment components by the alpha value of the source fragment.
*/
BLENDMODE_SRC_ALPHA_SATURATE: 7,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ONE_MINUS_SRC_ALPHA
* @description Multiply all fragment components by one minus the alpha value of the source fragment.
*/
BLENDMODE_ONE_MINUS_SRC_ALPHA: 8,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_DST_ALPHA
* @description Multiply all fragment components by the alpha value of the destination fragment.
*/
BLENDMODE_DST_ALPHA: 9,
/**
* @enum pc.BLENDMODE
* @name pc.BLENDMODE_ONE_MINUS_DST_ALPHA
* @description Multiply all fragment components by one minus the alpha value of the destination fragment.
*/
BLENDMODE_ONE_MINUS_DST_ALPHA: 10,
/**
* @enum pc.BLENDEQUATION
* @name pc.BLENDEQUATION_ADD
* @description Add the results of the source and destination fragment multiplies.
*/
BLENDEQUATION_ADD: 0,
/**
* @enum pc.BLENDEQUATION
* @name pc.BLENDEQUATION_SUBTRACT
* @description Subtract the results of the source and destination fragment multiplies.
*/
BLENDEQUATION_SUBTRACT: 1,
/**
* @enum pc.BLENDEQUATION
* @name pc.BLENDEQUATION_REVERSE_SUBTRACT
* @description Reverse and subtract the results of the source and destination fragment multiplies.
*/
BLENDEQUATION_REVERSE_SUBTRACT: 2,
/**
* @enum pc.BLENDEQUATION
* @name pc.BLENDEQUATION_MIN
* @description Use the smallest value. Check app.graphicsDevice.extBlendMinmax for support.
*/
BLENDEQUATION_MIN: 3,
/**
* @enum pc.BLENDEQUATION
* @name pc.BLENDEQUATION_MAX
* @description Use the largest value. Check app.graphicsDevice.extBlendMinmax for support.
*/
BLENDEQUATION_MAX: 4,
/**
* @enum pc.BUFFER
* @name pc.BUFFER_STATIC
* @description The data store contents will be modified once and used many times.
*/
BUFFER_STATIC: 0,
/**
* @enum pc.BUFFER
* @name pc.BUFFER_DYNAMIC
* @description The data store contents will be modified repeatedly and used many times.
*/
BUFFER_DYNAMIC: 1,
/**
* @enum pc.BUFFER
* @name pc.BUFFER_STREAM
* @description The data store contents will be modified once and used at most a few times.
*/
BUFFER_STREAM: 2,
/**
* @enum pc.BUFFER
* @name pc.BUFFER_GPUDYNAMIC
* @description The data store contents will be modified repeatedly on the GPU and used many times. Optimal for transform feedback usage (WebGL2 only).
*/
BUFFER_GPUDYNAMIC: 3,
/**
* @enum pc.CLEARFLAG
* @name pc.CLEARFLAG_COLOR
* @description Clear the color buffer.
*/
CLEARFLAG_COLOR: 1,
/**
* @enum pc.CLEARFLAG
* @name pc.CLEARFLAG_DEPTH
* @description Clear the depth buffer.
*/
CLEARFLAG_DEPTH: 2,
/**
* @enum pc.CLEARFLAG
* @name pc.CLEARFLAG_STENCIL
* @description Clear the stencil buffer.
*/
CLEARFLAG_STENCIL: 4,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_POSX
* @description The positive X face of a cubemap.
*/
CUBEFACE_POSX: 0,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_NEGX
* @description The negative X face of a cubemap.
*/
CUBEFACE_NEGX: 1,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_POSY
* @description The positive Y face of a cubemap.
*/
CUBEFACE_POSY: 2,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_NEGY
* @description The negative Y face of a cubemap.
*/
CUBEFACE_NEGY: 3,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_POSZ
* @description The positive Z face of a cubemap.
*/
CUBEFACE_POSZ: 4,
/**
* @enum pc.CUBEFACE
* @name pc.CUBEFACE_NEGZ
* @description The negative Z face of a cubemap.
*/
CUBEFACE_NEGZ: 5,
/**
* @enum pc.CULLFACE
* @name pc.CULLFACE_NONE
* @description No triangles are culled.
*/
CULLFACE_NONE: 0,
/**
* @enum pc.CULLFACE
* @name pc.CULLFACE_BACK
* @description Triangles facing away from the view direction are culled.
*/
CULLFACE_BACK: 1,
/**
* @enum pc.CULLFACE
* @name pc.CULLFACE_FRONT
* @description Triangles facing the view direction are culled.
*/
CULLFACE_FRONT: 2,
/**
* @enum pc.CULLFACE
* @name pc.CULLFACE_FRONTANDBACK
* @description Triangles are culled regardless of their orientation with respect to the view
* direction. Note that point or line primitives are unaffected by this render state.
*/
CULLFACE_FRONTANDBACK: 3,
/**
* @enum pc.TYPE
* @name pc.TYPE_INT8
* @description Signed byte vertex element type.
*/
TYPE_INT8: 0,
/**
* @enum pc.TYPE
* @name pc.TYPE_UINT8
* @description Unsigned byte vertex element type.
*/
TYPE_UINT8: 1,
/**
* @enum pc.TYPE
* @name pc.TYPE_INT16
* @description Signed short vertex element type.
*/
TYPE_INT16: 2,
/**
* @enum pc.TYPE
* @name pc.TYPE_UINT16
* @description Unsigned short vertex element type.
*/
TYPE_UINT16: 3,
/**
* @enum pc.TYPE
* @name pc.TYPE_INT32
* @description Signed integer vertex element type.
*/
TYPE_INT32: 4,
/**
* @enum pc.TYPE
* @name pc.TYPE_UINT32
* @description Unsigned integer vertex element type.
*/
TYPE_UINT32: 5,
/**
* @enum pc.TYPE
* @name pc.TYPE_FLOAT32
* @description Floating point vertex element type.
*/
TYPE_FLOAT32: 6,
/**
* @enum pc.FILTER
* @name pc.FILTER_NEAREST
* @description Point sample filtering.
*/
FILTER_NEAREST: 0,
/**
* @enum pc.FILTER
* @name pc.FILTER_LINEAR
* @description Bilinear filtering.
*/
FILTER_LINEAR: 1,
/**
* @enum pc.FILTER
* @name pc.FILTER_NEAREST_MIPMAP_NEAREST
* @description Use the nearest neighbor in the nearest mipmap level.
*/
FILTER_NEAREST_MIPMAP_NEAREST: 2,
/**
* @enum pc.FILTER
* @name pc.FILTER_NEAREST_MIPMAP_LINEAR
* @description Linearly interpolate in the nearest mipmap level.
*/
FILTER_NEAREST_MIPMAP_LINEAR: 3,
/**
* @enum pc.FILTER
* @name pc.FILTER_LINEAR_MIPMAP_NEAREST
* @description Use the nearest neighbor after linearly interpolating between mipmap levels.
*/
FILTER_LINEAR_MIPMAP_NEAREST: 4,
/**
* @enum pc.FILTER
* @name pc.FILTER_LINEAR_MIPMAP_LINEAR
* @description Linearly interpolate both the mipmap levels and between texels.
*/
FILTER_LINEAR_MIPMAP_LINEAR: 5,
FUNC_NEVER: 0,
FUNC_LESS: 1,
FUNC_EQUAL: 2,
FUNC_LESSEQUAL: 3,
FUNC_GREATER: 4,
FUNC_NOTEQUAL: 5,
FUNC_GREATEREQUAL: 6,
FUNC_ALWAYS: 7,
/**
* @enum pc.INDEXFORMAT
* @name pc.INDEXFORMAT_UINT8
* @description 8-bit unsigned vertex indices.
*/
INDEXFORMAT_UINT8: 0,
/**
* @enum pc.INDEXFORMAT
* @name pc.INDEXFORMAT_UINT16
* @description 16-bit unsigned vertex indices.
*/
INDEXFORMAT_UINT16: 1,
/**
* @enum pc.INDEXFORMAT
* @name pc.INDEXFORMAT_UINT32
* @description 32-bit unsigned vertex indices.
*/
INDEXFORMAT_UINT32: 2,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_A8
* @description 8-bit alpha.
*/
PIXELFORMAT_A8: 0,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_L8
* @description 8-bit luminance.
*/
PIXELFORMAT_L8: 1,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_L8_A8
* @description 8-bit luminance with 8-bit alpha.
*/
PIXELFORMAT_L8_A8: 2,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R5_G6_B5
* @description 16-bit RGB (5-bits for red channel, 6 for green and 5 for blue).
*/
PIXELFORMAT_R5_G6_B5: 3,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R5_G5_B5_A1
* @description 16-bit RGBA (5-bits for red channel, 5 for green, 5 for blue with 1-bit alpha).
*/
PIXELFORMAT_R5_G5_B5_A1: 4,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R4_G4_B4_A4
* @description 16-bit RGBA (4-bits for red channel, 4 for green, 4 for blue with 4-bit alpha).
*/
PIXELFORMAT_R4_G4_B4_A4: 5,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R8_G8_B8
* @description 24-bit RGB (8-bits for red channel, 8 for green and 8 for blue).
*/
PIXELFORMAT_R8_G8_B8: 6,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R8_G8_B8_A8
* @description 32-bit RGBA (8-bits for red channel, 8 for green, 8 for blue with 8-bit alpha).
*/
PIXELFORMAT_R8_G8_B8_A8: 7,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_DXT1
* @description Block compressed format, storing 16 input pixels in 64 bits of output, consisting of two 16-bit RGB 5:6:5 color values and a 4x4 two bit lookup table.
*/
PIXELFORMAT_DXT1: 8,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_DXT3
* @description Block compressed format, storing 16 input pixels (corresponding to a 4x4 pixel block) into 128 bits of output, consisting of 64 bits of alpha channel data (4 bits for each pixel) followed by 64 bits of color data, encoded the same way as DXT1.
*/
PIXELFORMAT_DXT3: 9,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_DXT5
* @description Block compressed format, storing 16 input pixels into 128 bits of output, consisting of 64 bits of alpha channel data (two 8 bit alpha values and a 4x4 3 bit lookup table) followed by 64 bits of color data (encoded the same way as DXT1).
*/
PIXELFORMAT_DXT5: 10,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_RGB16F
* @description 16-bit floating point RGB (16-bit float for each red, green and blue channels).
*/
PIXELFORMAT_RGB16F: 11,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_RGBA16F
* @description 16-bit floating point RGBA (16-bit float for each red, green, blue and alpha channels).
*/
PIXELFORMAT_RGBA16F: 12,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_RGB32F
* @description 32-bit floating point RGB (32-bit float for each red, green and blue channels).
*/
PIXELFORMAT_RGB32F: 13,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_RGBA32F
* @description 32-bit floating point RGBA (32-bit float for each red, green, blue and alpha channels).
*/
PIXELFORMAT_RGBA32F: 14,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_R32F
* @description 32-bit floating point single channel format (WebGL2 only).
*/
PIXELFORMAT_R32F: 15,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_DEPTH
* @description A readable depth buffer format
*/
PIXELFORMAT_DEPTH: 16,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_DEPTHSTENCIL
* @description A readable depth/stencil buffer format (WebGL2 only).
*/
PIXELFORMAT_DEPTHSTENCIL: 17,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_111110F
* @description A floating-point color-only format with 11 bits for red and green channels, and 10 bits for the blue channel (WebGL2 only).
*/
PIXELFORMAT_111110F: 18,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_SRGB
* @description Color-only sRGB format (WebGL2 only).
*/
PIXELFORMAT_SRGB: 19,
/**
* @enum pc.PIXELFORMAT
* @name pc.PIXELFORMAT_SRGBA
* @description Color sRGB format with additional alpha channel (WebGL2 only).
*/
PIXELFORMAT_SRGBA: 20,
PIXELFORMAT_ETC1: 21,
PIXELFORMAT_PVRTC_2BPP_RGB_1: 22,
PIXELFORMAT_PVRTC_2BPP_RGBA_1: 23,
PIXELFORMAT_PVRTC_4BPP_RGB_1: 24,
PIXELFORMAT_PVRTC_4BPP_RGBA_1: 25,
// only add compressed formats next
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_POINTS
* @description List of distinct points.
*/
PRIMITIVE_POINTS: 0,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_LINES
* @description Discrete list of line segments.
*/
PRIMITIVE_LINES: 1,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_LINELOOP
* @description List of points that are linked sequentially by line segments, with a closing line segment between the last and first points.
*/
PRIMITIVE_LINELOOP: 2,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_LINESTRIP
* @description List of points that are linked sequentially by line segments.
*/
PRIMITIVE_LINESTRIP: 3,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_TRIANGLES
* @description Discrete list of triangles.
*/
PRIMITIVE_TRIANGLES: 4,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_TRISTRIP
* @description Connected strip of triangles where a specified vertex forms a triangle using the previous two.
*/
PRIMITIVE_TRISTRIP: 5,
/**
* @enum pc.PRIMITIVE
* @name pc.PRIMITIVE_TRIFAN
* @description Connected fan of triangles where the first vertex forms triangles with the following pairs of vertices.
*/
PRIMITIVE_TRIFAN: 6,
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_POSITION
* @description Vertex attribute to be treated as a position.
*/
SEMANTIC_POSITION: "POSITION",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_NORMAL
* @description Vertex attribute to be treated as a normal.
*/
SEMANTIC_NORMAL: "NORMAL",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TANGENT
* @description Vertex attribute to be treated as a tangent.
*/
SEMANTIC_TANGENT: "TANGENT",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_BLENDWEIGHT
* @description Vertex attribute to be treated as skin blend weights.
*/
SEMANTIC_BLENDWEIGHT: "BLENDWEIGHT",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_BLENDINDICES
* @description Vertex attribute to be treated as skin blend indices.
*/
SEMANTIC_BLENDINDICES: "BLENDINDICES",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_COLOR
* @description Vertex attribute to be treated as a color.
*/
SEMANTIC_COLOR: "COLOR",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD0
* @description Vertex attribute to be treated as a texture coordinate (set 0).
*/
SEMANTIC_TEXCOORD0: "TEXCOORD0",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD1
* @description Vertex attribute to be treated as a texture coordinate (set 1).
*/
SEMANTIC_TEXCOORD1: "TEXCOORD1",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD2
* @description Vertex attribute to be treated as a texture coordinate (set 2).
*/
SEMANTIC_TEXCOORD2: "TEXCOORD2",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD3
* @description Vertex attribute to be treated as a texture coordinate (set 3).
*/
SEMANTIC_TEXCOORD3: "TEXCOORD3",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD4
* @description Vertex attribute to be treated as a texture coordinate (set 4).
*/
SEMANTIC_TEXCOORD4: "TEXCOORD4",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD5
* @description Vertex attribute to be treated as a texture coordinate (set 5).
*/
SEMANTIC_TEXCOORD5: "TEXCOORD5",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD6
* @description Vertex attribute to be treated as a texture coordinate (set 6).
*/
SEMANTIC_TEXCOORD6: "TEXCOORD6",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_TEXCOORD7
* @description Vertex attribute to be treated as a texture coordinate (set 7).
*/
SEMANTIC_TEXCOORD7: "TEXCOORD7",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR0
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR0: "ATTR0",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR1
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR1: "ATTR1",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR2
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR2: "ATTR2",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR3
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR3: "ATTR3",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR4
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR4: "ATTR4",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR5
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR5: "ATTR5",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR6
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR6: "ATTR6",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR7
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR7: "ATTR7",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR8
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR8: "ATTR8",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR9
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR9: "ATTR9",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR10
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR10: "ATTR10",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR11
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR11: "ATTR11",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR12
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR12: "ATTR12",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR13
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR13: "ATTR13",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR14
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR14: "ATTR14",
/**
* @enum pc.SEMANTIC
* @name pc.SEMANTIC_ATTR15
* @description Vertex attribute with a user defined semantic.
*/
SEMANTIC_ATTR15: "ATTR15",
SHADERTAG_MATERIAL: 1,
STENCILOP_KEEP: 0,
STENCILOP_ZERO: 1,
STENCILOP_REPLACE: 2,
STENCILOP_INCREMENT: 3,
STENCILOP_INCREMENTWRAP: 4,
STENCILOP_DECREMENT: 5,
STENCILOP_DECREMENTWRAP: 6,
STENCILOP_INVERT: 7,
/**
* @enum pc.TEXTURELOCK
* @name pc.TEXTURELOCK_READ
* @description Read only. Any changes to the locked mip level's pixels will not update the texture.
*/
TEXTURELOCK_READ: 1,
/**
* @enum pc.TEXTURELOCK
* @name pc.TEXTURELOCK_WRITE
* @description Write only. The contents of the specified mip level will be entirely replaced.
*/
TEXTURELOCK_WRITE: 2,
TEXHINT_NONE: 0,
TEXHINT_SHADOWMAP: 1,
TEXHINT_ASSET: 2,
TEXHINT_LIGHTMAP: 3,
UNIFORMTYPE_BOOL: 0,
UNIFORMTYPE_INT: 1,
UNIFORMTYPE_FLOAT: 2,
UNIFORMTYPE_VEC2: 3,
UNIFORMTYPE_VEC3: 4,
UNIFORMTYPE_VEC4: 5,
UNIFORMTYPE_IVEC2: 6,
UNIFORMTYPE_IVEC3: 7,
UNIFORMTYPE_IVEC4: 8,
UNIFORMTYPE_BVEC2: 9,
UNIFORMTYPE_BVEC3: 10,
UNIFORMTYPE_BVEC4: 11,
UNIFORMTYPE_MAT2: 12,
UNIFORMTYPE_MAT3: 13,
UNIFORMTYPE_MAT4: 14,
UNIFORMTYPE_TEXTURE2D: 15,
UNIFORMTYPE_TEXTURECUBE: 16,
UNIFORMTYPE_FLOATARRAY: 17,
UNIFORMTYPE_TEXTURE2D_SHADOW: 18,
UNIFORMTYPE_TEXTURECUBE_SHADOW: 19,
UNIFORMTYPE_TEXTURE3D: 20
};
pc.extend(pc, enums);
// For backwards compatibility
pc.gfx = {};
pc.extend(pc.gfx, enums);
}());