Skip to content

Commit e7705e4

Browse files
dakersankhesh
authored andcommitted
fix(CellArrayMapper): correct alpha channel handling to use texture alpha for transparency
Set computedColor.a to multiply mapperUBO.Opacity with the diffuse texture’s alpha channel, ensuring proper transparency rendering. fixes #3273
1 parent 7b29217 commit e7705e4

File tree

1 file changed

+2
-0
lines changed
  • Sources/Rendering/WebGPU/CellArrayMapper

1 file changed

+2
-0
lines changed

Sources/Rendering/WebGPU/CellArrayMapper/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ fn main(
345345
346346
//VTK::Select::Impl
347347
348+
// Use texture alpha for transparency
349+
computedColor.a = mapperUBO.Opacity * _diffuseMap.a;
348350
if (computedColor.a == 0.0) { discard; };
349351
350352
//VTK::Position::Impl

0 commit comments

Comments
 (0)