Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions Sources/Rendering/OpenGL/ImageCPRMapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ function vtkOpenGLImageCPRMapper(publicAPI, model) {
];
if (useProjection) {
tcoordFSDec.push(
'uniform vec3 volumeSizeMC;',
'uniform int projectionSlabNumberOfSamples;',
'uniform float projectionConstantOffset;',
'uniform float projectionStepLength;'
Expand Down Expand Up @@ -930,7 +929,7 @@ function vtkOpenGLImageCPRMapper(publicAPI, model) {

// Loop on all the samples of the projection
tcoordFSImpl.push(
'vec3 projectionScaledDirection = projectionDirection / volumeSizeMC;',
'vec3 projectionScaledDirection = (MCTCMatrix * vec4(projectionDirection, 0.0)).xyz;',
'vec3 projectionStep = projectionStepLength * projectionScaledDirection;',
'vec3 projectionStartPosition = volumePosTC + projectionConstantOffset * projectionScaledDirection;',
'vec4 tvalue = initialProjectionTextureValue;',
Expand Down Expand Up @@ -1199,16 +1198,11 @@ function vtkOpenGLImageCPRMapper(publicAPI, model) {
}
// Projection uniforms
if (model.renderable.isProjectionEnabled()) {
const image = model.currentImageDataInput;
const spacing = image.getSpacing();
const dimensions = image.getDimensions();
const projectionSlabThickness =
model.renderable.getProjectionSlabThickness();
const projectionSlabNumberOfSamples =
model.renderable.getProjectionSlabNumberOfSamples();

const volumeSize = vec3.mul([], spacing, dimensions);
program.setUniform3fArray('volumeSizeMC', volumeSize);
program.setUniformi(
'projectionSlabNumberOfSamples',
projectionSlabNumberOfSamples
Expand Down
Loading