SoImageFileSampler¶
-
InventorModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoImageSamplers
definition SoImageSamplers.def see also SoVertexShader
,SoFragmentShader
,SoMLSampler2D
keywords 2D
,3D
,cubemap
,dds
,hdr
,texture
,array
Purpose¶
The SoImageFileSampler
module allows to load an image file as a texture sampler for a SoFragmentShader
.
In addition it allows load cube map textures from a “cross” image, see Create Cube Map From Cross
.
It supports (at least) the following file formats:
*.dds - Direct Draw Surface (2D, 3D and cube maps)
*.hdr - High Dynamic Range float images
*.png
*.jpg, *.jpe
*.pnm, *.ppm, *.pgm
*.jpe
*.bmp
*.tif
*.tiff
*.dcm, *.dicom
*.mlimage
Usage¶
See the example network.
Tips¶
Note that images are loaded on demand, so the image will only get loaded if the sampler is actually used in a shader.
Parameter Fields¶
Field Index¶
Border Color : Vector4 |
Needs Texture Coordinates : Bool |
textureIsCompressed : Bool |
Create Cube Map From Cross : Bool |
Texture Is Cube Map : Bool |
Use Texture Arrays : Bool |
Create Seamless Cube Map : Bool |
Texture Is Valid : Bool |
use16BitFloat : Bool |
Enable Border : Bool |
Texture Is3D : Bool |
Wrap R : Enum |
Filename : String |
Texture Num Levels : Integer |
Wrap S : Enum |
Mag Filter : Enum |
Texture Size X : Integer |
Wrap T : Enum |
Min Filter : Enum |
Texture Size Y : Integer |
|
Name : String |
Texture Size Z : Integer |
Visible Fields¶
Min Filter¶
-
name:
minFilter
, type:
Enum
, default:
LINEAR
¶
Values:
Title | Name |
---|---|
Nearest | NEAREST |
Linear | LINEAR |
Nearest Mipmap Nearest | NEAREST_MIPMAP_NEAREST |
Nearest Mipmap Linear | NEAREST_MIPMAP_LINEAR |
Linear Mipmap Nearest | LINEAR_MIPMAP_NEAREST |
Linear Mipmap Linear | LINEAR_MIPMAP_LINEAR |
Mag Filter¶
-
name:
magFilter
, type:
Enum
, default:
LINEAR
¶
Values:
Title | Name |
---|---|
Nearest | NEAREST |
Linear | LINEAR |
Nearest Mipmap Nearest | NEAREST_MIPMAP_NEAREST |
Nearest Mipmap Linear | NEAREST_MIPMAP_LINEAR |
Linear Mipmap Nearest | LINEAR_MIPMAP_NEAREST |
Linear Mipmap Linear | LINEAR_MIPMAP_LINEAR |
Wrap S¶
-
name:
wrapS
, type:
Enum
, default:
REPEAT
¶
Values:
Title | Name |
---|---|
Repeat | REPEAT |
Clamp | CLAMP |
Clamp To Edge | CLAMP_TO_EDGE |
Clamp To Border | CLAMP_TO_BORDER |
Mirrored Repeat | MIRRORED_REPEAT |
Wrap T¶
-
name:
wrapT
, type:
Enum
, default:
REPEAT
¶
Values:
Title | Name |
---|---|
Repeat | REPEAT |
Clamp | CLAMP |
Clamp To Edge | CLAMP_TO_EDGE |
Clamp To Border | CLAMP_TO_BORDER |
Mirrored Repeat | MIRRORED_REPEAT |
Wrap R¶
-
name:
wrapR
, type:
Enum
, default:
REPEAT
¶
Values:
Title | Name |
---|---|
Repeat | REPEAT |
Clamp | CLAMP |
Clamp To Edge | CLAMP_TO_EDGE |
Clamp To Border | CLAMP_TO_BORDER |
Mirrored Repeat | MIRRORED_REPEAT |
Use Texture Arrays¶
-
name:
useTextureArrays
, type:
Bool
, default:
FALSE
¶ Enables usage of texture arrays instead of a 3D textures.
Create Cube Map From Cross¶
-
name:
createCubeMapFromCross
, type:
Bool
, default:
FALSE
¶ Assumes that the 2D image contains a cross image that can be converted to a cube map.
Create Seamless Cube Map¶
-
name:
createSeamlessCubeMap
, type:
Bool
, default:
FALSE
¶ If true, a seamless cube map sampler is created. Otherwise the interpolation stops at the face borders.
Texture Size X¶
-
name:
textureSizeX
, type:
Integer
, persistent:
no
¶ Output of the size in x direction.
Texture Size Y¶
-
name:
textureSizeY
, type:
Integer
, persistent:
no
¶ Output of the size in y direction.
Texture Size Z¶
-
name:
textureSizeZ
, type:
Integer
, persistent:
no
¶ Output of the size in z direction.
Texture Num Levels¶
-
name:
textureNumLevels
, type:
Integer
, persistent:
no
¶ Number of MIP MAP levels in the loaded texture.
Texture Is Cube Map¶
-
name:
textureIsCubeMap
, type:
Bool
, persistent:
no
¶ Indicates whether the loaded texture contains a cube map.
Texture Is3D¶
-
name:
textureIs3D
, type:
Bool
, persistent:
no
¶ Indicates whether the loaded texture is 3D.