SoView2DShaderOverlay¶
-
InventorModule
¶ genre View2DExtended
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition SoView2DShader.def inherits from SoView2DExtension
keywords GLSL
Purpose¶
The SoView2DShaderOverlay
allows to render overlays on top of a SoView2D
using a custom shader pipeline.
This shader can be extended using SoView2DShaderFunction
and SoView2DShaderInclude
.
For debugging, place a SoView2DShaderDiagnosis
before this module.
The shader has access to the GLSL shader framework
, so you can make use of any shader parameters and samplers.
The generated shader offers the rendering of multiple SoView2DOverlay
and SoView2DOverlayMPR
overlays inside of a single shader.
This allows to create effects based on the values of multiple overlays.
For best blending results, you should typically use “Blend” in the overlay modules and “Pre-multiplied Blend” on the overlay shader module. This is the case because the individual overlays are first blended inside the shader using front-to-back blending, which results in a result color and alpha value. The result color is already multiplied with the alpha (which is called premultiplied). Thus, the correct blend mode for the final result color is pre-multiplied blend.
Parameter Fields¶
Field Index¶
alt : Enum |
createNewModeRequest : Trigger |
needsValidVoxel : Bool |
Blend Mode : Enum |
cursorShape : Enum |
Render On Slab : Bool |
button1 : Enum |
Disable Base Image Drawing : Bool |
selectionTolerance : Float |
button2 : Enum |
Drawing On : Bool |
setEventHandled : Bool |
button3 : Enum |
editingOn : Bool |
shift : Enum |
Clip To Slice : Bool |
fixZOn : Bool |
wantsAllEvents : Bool |
color : Color |
ignoreHandledEvents : Bool |
wantsKeyEvents : Bool |
control : Enum |
interactionProviderID : String |
wantsMouseWheelEvents : Bool |
createNewMode : Bool |
maskValid : Bool |
Visible Fields¶
Blend Mode¶
-
name:
blendMode
, type:
Enum
, default:
BLEND_PREMULTIPLIED_BLEND
¶ Selects the blend mode of the shader’s result.
Values:
Title | Name |
---|---|
Replace | BLEND_REPLACE |
Add | BLEND_ADD |
Screen | BLEND_SCREEN |
Blend | BLEND_BLEND |
Premultiplied Blend | BLEND_PREMULTIPLIED_BLEND |
Maximum | BLEND_MAXIMUM |
Minimum | BLEND_MINIMUM |
Reverse Subtract | BLEND_REVERSE_SUBTRACT |
Subtract | BLEND_SUBTRACT |