Skip to content

Commit f3cfe26

Browse files
PaulHaxfinetjul
authored andcommitted
fix(Property): stop setSpecularPower from overwriting roughness
Drop the setSpecularPower override that also writes roughness, leaving the plain macro.setGet setter behind. Property-bag sets are now commutative with respect to specularPower and roughness, like every other PBR field on vtkProperty.
1 parent 129222d commit f3cfe26

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

Sources/Rendering/Core/Property/index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,6 @@ function vtkProperty(publicAPI, model) {
6262
return [].concat(model.color);
6363
};
6464

65-
publicAPI.setSpecularPower = (specularPower) => {
66-
const roughness = 1 / Math.max(1.0, specularPower);
67-
if (
68-
model.roughness !== roughness ||
69-
model.specularPower !== specularPower
70-
) {
71-
model.specularPower = specularPower; // Specular power still needs to be set as long as webgl is using it (otherwise testShaderReplacementsClear fails)
72-
model.roughness = roughness;
73-
publicAPI.modified();
74-
}
75-
};
76-
7765
publicAPI.addShaderVariable = notImplemented('AddShaderVariable');
7866

7967
publicAPI.setInterpolationToFlat = () =>

0 commit comments

Comments
 (0)