Skip to content

Commit

Permalink
fix(colorMapping): Fix color mapping for direct scalars
Browse files Browse the repository at this point in the history
Coloring was broken when using direct scalars with cellData
See this comment:
#3075 (comment)
  • Loading branch information
bruyeret authored and finetjul committed Jul 30, 2024
1 parent 1301776 commit e56b72b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Rendering/Core/Mapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ function vtkMapper(publicAPI, model) {
};

publicAPI.canUseTextureMapForColoring = (scalars, cellFlag) => {
if (cellFlag) {
if (cellFlag && !(model.colorMode === ColorMode.DIRECT_SCALARS)) {
return true; // cell data always use textures.
}

Expand Down

0 comments on commit e56b72b

Please sign in to comment.