Skip to content

Commit a680eb5

Browse files
committed
fix(cloud-picture): uploaded texture in gpu can get alpha data
solution fix UpdateTextureArrayCPJobEntity->_fillImageDataToBufferDataWithFixedSize: get alpha data instead of 255;
1 parent 5932613 commit a680eb5

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

src/run/domain_layer/domain/pipeline/pipeline/entity/jobs/update/UpdateTextureArrayCPJobEntity.re

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ let _fillImageDataToBufferDataWithFixedSize =
191191
);
192192
TypeArrayCPRepoUtils.setUint8_1WithoutCheck(
193193
bufferDataIndex + 3,
194-
255,
194+
TypeArrayCPRepoUtils.getUint8_1(dataIndex + 3, data),
195195
bufferData,
196196
);
197197

test/run/integration/updateTextureArrayCPJob_test.re

+32-32
Original file line numberDiff line numberDiff line change
@@ -489,11 +489,11 @@ let _ =
489489
1,
490490
2,
491491
0,
492-
255,
493492
0,
494493
0,
495494
0,
496-
255,
495+
0,
496+
0,
497497
0,
498498
0,
499499
0,
@@ -503,11 +503,11 @@ let _ =
503503
0,
504504
0,
505505
0,
506-
255,
507506
0,
508507
0,
509508
0,
510-
255,
509+
0,
510+
0,
511511
0,
512512
0,
513513
0,
@@ -517,11 +517,11 @@ let _ =
517517
0,
518518
0,
519519
0,
520-
255,
521520
0,
522521
0,
523522
0,
524-
255,
523+
0,
524+
0,
525525
0,
526526
0,
527527
0,
@@ -531,11 +531,11 @@ let _ =
531531
0,
532532
0,
533533
0,
534-
255,
535534
0,
536535
0,
537536
0,
538-
255,
537+
0,
538+
0,
539539
0,
540540
0,
541541
0,
@@ -547,29 +547,29 @@ let _ =
547547
1,
548548
3,
549549
2,
550-
255,
551550
0,
552551
0,
553552
0,
554-
255,
555553
0,
556554
0,
557555
0,
558-
255,
556+
0,
557+
0,
558+
0,
559559
|]),
560560
Js.Typed_array.Uint8Array.make([|
561561
0,
562562
0,
563563
0,
564-
255,
565564
0,
566565
0,
567566
0,
568-
255,
569567
0,
570568
0,
571569
0,
572-
255,
570+
0,
571+
0,
572+
0,
573573
|]),
574574
Js.Typed_array.Uint8Array.make([|
575575
0,
@@ -605,11 +605,11 @@ let _ =
605605
1,
606606
0,
607607
0,
608-
255,
609608
0,
610609
0,
611610
0,
612-
255,
611+
0,
612+
0,
613613
0,
614614
0,
615615
0,
@@ -663,11 +663,11 @@ let _ =
663663
1,
664664
2,
665665
0,
666-
255,
667666
0,
668667
0,
669668
0,
670-
255,
669+
0,
670+
0,
671671
0,
672672
0,
673673
0,
@@ -677,11 +677,11 @@ let _ =
677677
0,
678678
0,
679679
0,
680-
255,
681680
0,
682681
0,
683682
0,
684-
255,
683+
0,
684+
0,
685685
0,
686686
0,
687687
0,
@@ -721,11 +721,11 @@ let _ =
721721
3,
722722
4,
723723
0,
724-
255,
725724
0,
726725
0,
727726
0,
728-
255,
727+
0,
728+
0,
729729
0,
730730
0,
731731
0,
@@ -735,11 +735,11 @@ let _ =
735735
0,
736736
0,
737737
0,
738-
255,
739738
0,
740739
0,
741740
0,
742-
255,
741+
0,
742+
0,
743743
0,
744744
0,
745745
0,
@@ -749,11 +749,11 @@ let _ =
749749
0,
750750
0,
751751
0,
752-
255,
753752
0,
754753
0,
755754
0,
756-
255,
755+
0,
756+
0,
757757
0,
758758
0,
759759
0,
@@ -763,11 +763,11 @@ let _ =
763763
0,
764764
0,
765765
0,
766-
255,
767766
0,
768767
0,
769768
0,
770-
255,
769+
0,
770+
0,
771771
0,
772772
0,
773773
0,
@@ -779,11 +779,11 @@ let _ =
779779
3,
780780
2,
781781
1,
782-
255,
782+
5,
783783
100,
784784
150,
785785
101,
786-
255,
786+
1,
787787
0,
788788
0,
789789
0,
@@ -793,11 +793,11 @@ let _ =
793793
102,
794794
150,
795795
101,
796-
255,
796+
3,
797797
97,
798798
150,
799799
101,
800-
255,
800+
5,
801801
0,
802802
0,
803803
0,

test/run/tool/BSDFMaterialCPTool.re

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ let buildRepoWithTwoMaterialsAndMapData = sandbox => {
4646
3,
4747
2,
4848
1,
49-
255,
49+
5,
5050
100,
5151
150,
5252
101,
53-
255,
53+
1,
5454
102,
5555
150,
5656
101,
57-
255,
57+
3,
5858
97,
5959
150,
6060
101,
61-
255,
61+
5,
6262
|]),
6363
};
6464
let imageData4 = {

0 commit comments

Comments
 (0)