You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Sources\Rendering\OpenGL\VolumeMapper\index.js, the opacity texture is created by the function buildBufferObjects.
This function is only called when getNeedToRebuildBufferObjects returns true.
But opacity texture values depend on publicAPI.getCurrentSampleDistance but the change of sample distance is not taken into account in getNeedToRebuildBufferObjects.
Steps to reproduce
Create a simple scene with a volume, don't use high level objects like proxies and vtkVolumeController, as they can change the sample distance
Set the sample distance and make the very first render of the mapper
Set the sample distance to something different and rerender
Detailed Behavior
The opacity texture is rebuilt.
Expected Behavior
The opacity texture should be rebuilt.
This can be fixed by rebuilding the opacity texture when sample distance changes, but it doesn't look like a good idea.
A better solution would be to make the opacity texture independant of sample distance and use the sample distance in the volume mapper fragment shader instead. It could be less performant though.
Environment
vtk.js version: master
Browsers: Chrome
OS: Windows
The text was updated successfully, but these errors were encountered:
Bug description
In
Sources\Rendering\OpenGL\VolumeMapper\index.js
, the opacity texture is created by the functionbuildBufferObjects
.This function is only called when
getNeedToRebuildBufferObjects
returns true.But opacity texture values depend on
publicAPI.getCurrentSampleDistance
but the change of sample distance is not taken into account ingetNeedToRebuildBufferObjects
.Steps to reproduce
Detailed Behavior
The opacity texture is rebuilt.
Expected Behavior
The opacity texture should be rebuilt.
This can be fixed by rebuilding the opacity texture when sample distance changes, but it doesn't look like a good idea.
A better solution would be to make the opacity texture independant of sample distance and use the sample distance in the volume mapper fragment shader instead. It could be less performant though.
Environment
The text was updated successfully, but these errors were encountered: