Skip to content

Commit

Permalink
test: Update tests that now fail
Browse files Browse the repository at this point in the history
The normals have been fixed in the shader, hence the difference
Also the sample distance is not computed in index space anymore
This explains some differences
  • Loading branch information
bruyeret committed Oct 4, 2024
1 parent 4a51712 commit dd4af97
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/Rendering/Core/VolumeMapper/test/testColorMix.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ test('Test Volume Rendering: custom shader code', async (t) => {
if (opacity1 > 0.5) {
return vec4(0.0, 1.0, 1.0, 0.1);
} else {
vec3 posIS = VCtoIS(posVC);
vec3 posIS = posVCtoIS(posVC);
mat4 normalMat = computeMat4Normal(posIS, tValue);
float opacity0 = getOpacityFromTexture(tValue[0], 0, volume.transferFunctionsSampleHeight[0]);
vec3 color0 = getColorFromTexture(tValue[0], 0, volume.transferFunctionsSampleHeight[0]);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Sources/Rendering/Core/VolumeMapper/test/testColorMixCustom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions Sources/Rendering/OpenGL/VolumeMapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
}

function unregisterGraphicsResources(renderWindow) {
graphicsResourceReferenceCount
.keys()
.forEach((coreObject) =>
renderWindow.unregisterGraphicsResourceUser(coreObject, publicAPI)
);
// Convert to an array using the spread operator as Firefox doesn't support Iterator.forEach()
[...graphicsResourceReferenceCount.keys()].forEach((coreObject) =>
renderWindow.unregisterGraphicsResourceUser(coreObject, publicAPI)
);
}

publicAPI.buildPass = () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd4af97

Please sign in to comment.