Class VolumeShaders (mod)
Shaders for 3D OCT-Volume Rendering. Most fragment shaders store depth in v.n.Z, texcoords in v.n.X and v.n.Y, gradient in v.b, position in volume in v.t
Inheritance
Namespace: Visualization
Assembly: OCTVis.dll
Syntax
module VolumeShaders
Fields
val cubeBackSmp
samples the backface cube texture
Declaration
val cubeBackSmp: Sampler2d
Field Value
Type | Description |
---|---|
FShade.Sampler2d |
val cubeFrontSmp
samples the frontface cube texture
Declaration
val cubeFrontSmp: Sampler2d
Field Value
Type | Description |
---|---|
FShade.Sampler2d |
val eps
Declaration
val eps: float
Field Value
Type | Description |
---|---|
float |
val fluidTexture
3D Fluid-Segmentation Sampler
Declaration
val fluidTexture: Sampler3d
Field Value
Type | Description |
---|---|
FShade.Sampler3d |
val inf
Declaration
val inf: float
Field Value
Type | Description |
---|---|
float |
val layerTexture
3D Layer-Segmentation Sampler
Declaration
val layerTexture: Sampler3d
Field Value
Type | Description |
---|---|
FShade.Sampler3d |
val tfTexture
Transfer Function Sampler
Declaration
val tfTexture: Sampler2d
Field Value
Type | Description |
---|---|
FShade.Sampler2d |
val volumeTexture
3D Volume-Texture Sampler
Declaration
val volumeTexture: Sampler3d
Field Value
Type | Description |
---|---|
FShade.Sampler3d |
Methods
val basic: Vertex -> Expr<Vertex>
basic OCT-Volume fragment shader.
Declaration
val basic: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val calcGradients: Vertex -> Expr<Vertex>
fragment shader that computes gradients and stores them in v.b, must be used after another volume shader (MIP,BASIC). used for ENHANCED pipeline
Declaration
val calcGradients: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val classify: float -> bool -> float * V4d
classifies a given sample through a transfer function. If the photoreceptor layer was hit and draw layer = true -> the sample gets colored with a red hue.
Declaration
[<ReflectedDefinition>]
val classify: s:float -> layerHit:bool -> float * V4d
Parameters
Type | Name | Description |
---|---|---|
float | s | sample to be classified |
bool | layerHit | layer segmentation hit or not |
Returns
Type | Description |
---|---|
float * Aardvark.Base.V4d |
val computeGradient: Sampler3d -> V3d -> V3d -> float -> V3d
computes the gradient at point p (not normalized)
Declaration
[<ReflectedDefinition>]
val computeGradient: smp:Sampler3d -> dims:V3d -> p:V3d -> level:float -> V3d
Parameters
Type | Name | Description |
---|---|---|
FShade.Sampler3d | smp | sampler that samples the 3D volume |
Aardvark.Base.V3d | dims | dimensions of the volume in pixels |
Aardvark.Base.V3d | p | point at which the gradient should be computed |
float | level | sample level (mipmaps) |
Returns
Type | Description |
---|---|
Aardvark.Base.V3d |
val cubeFrag: Vertex -> Expr<Vertex>
cube texture fragment shader
Declaration
val cubeFrag: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val cubeVert: Vertex -> Expr<Vertex>
cube texture vertex shader. stores world position in color.
Declaration
val cubeVert: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val depthShading: Vertex -> Expr<Vertex>
depth shading fragment shader - gives a blue tint to farther away fragments. used in ENHANCED pipeline
Declaration
val depthShading: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val drawFluid: V3d -> V3d -> V3d -> V4d * bool
determines if the fluid segmentation should be drawn at point p. returns the color and whether the segmentation should be drawn or not.
Declaration
[<ReflectedDefinition>]
val drawFluid: p:V3d -> lightpos:V3d -> c:V3d -> V4d * bool
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.V3d | p | point |
Aardvark.Base.V3d | lightpos | light position |
Aardvark.Base.V3d | c | camera location |
Returns
Type | Description |
---|---|
Aardvark.Base.V4d * bool |
val drawSlicePlane: Vertex -> Expr<Vertex>
fragment shader that draws the current 2D slice plane inside the OCT-volume
Declaration
val drawSlicePlane: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val enhancedPipelineFull: Vertex -> Expr<Vertex>
fragment shader implementing the approach by Viehland et al. users can set voxel transparency and toggle layer segmentation drawing
Declaration
val enhancedPipelineFull: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val enhanceEdges: Vertex -> Expr<Vertex>
fragment shader that enhances edges (based on gradients). used in ENHANCED pipeline.
Declaration
val enhanceEdges: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val enhanceFeatures: Vertex -> Expr<Vertex>
fragment shader that enhances features (based on gradients and view direction). used in ENHANCED pipeline.
Declaration
val enhanceFeatures: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val enhanceSample: float -> float
enhances a given sample
Declaration
[<ReflectedDefinition>]
val enhanceSample: s:float -> float
Parameters
Type | Name | Description |
---|---|---|
float | s | sample to be enhanced |
Returns
Type | Description |
---|---|
float |
val firstGrad: Vertex -> Expr<Vertex>
fragment shader that draws the OCT-Volume using first-hit and phong shading
Declaration
val firstGrad: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val fluid: Vertex -> Expr<Vertex>
fragment shader that draws the fluid segmentation
Declaration
val fluid: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val mip: Vertex -> Expr<Vertex>
maximum intensity projection shader for 3D volume rendering
Declaration
val mip: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |
val phong: Sampler3d -> float -> V3d -> V3d -> V3d -> V3d -> float -> V4d
computes phong shading at point p
Declaration
[<ReflectedDefinition>]
val phong: smp:Sampler3d -> s:float -> dims:V3d -> p:V3d -> lightpos:V3d -> vp:V3d -> level:float -> V4d
Parameters
Type | Name | Description |
---|---|---|
FShade.Sampler3d | smp | sampler that samples the 3D volume |
float | s | sample at location p |
Aardvark.Base.V3d | dims | dimensions of the volume in pixels |
Aardvark.Base.V3d | p | point at which shading should be computed |
Aardvark.Base.V3d | lightpos | light position |
Aardvark.Base.V3d | vp | viewpoint |
float | level | sample level fro gradient (mipmaps) |
Returns
Type | Description |
---|---|
Aardvark.Base.V4d |
val phong2: Sampler3d -> V4d -> V3d -> V3d -> V3d -> V3d -> float -> float -> V4d
computes phong shading at point p. needs pre-computed normal
Declaration
[<ReflectedDefinition>]
val phong2: smp:Sampler3d -> s:V4d -> p:V3d -> n:V3d -> lightpos:V3d -> vp:V3d -> specExp:float -> specIntens:float -> V4d
Parameters
Type | Name | Description |
---|---|---|
FShade.Sampler3d | smp | sampler that samples the 3D volume |
Aardvark.Base.V4d | s | color at location p |
Aardvark.Base.V3d | p | point at which shading should be computed |
Aardvark.Base.V3d | n | normal vector at point p (normalized) |
Aardvark.Base.V3d | lightpos | light position |
Aardvark.Base.V3d | vp | viewpoint |
float | specExp | specular exponent |
float | specIntens | specular intensity |
Returns
Type | Description |
---|---|
Aardvark.Base.V4d |
val phongShading: Vertex -> Expr<Vertex>
phong shading fragment shader. used in ENHANCED pipeline
Declaration
val phongShading: v:Vertex -> Expr<Vertex>
Parameters
Type | Name | Description |
---|---|---|
Aardvark.Base.Rendering.Effects.Vertex | v |
Returns
Type | Description |
---|---|
FSharp.Quotations.Expr<Aardvark.Base.Rendering.Effects.Vertex> |