Skip to content

X3DSharedSamplerDef

14.23

Uncategorized - no domain claims this class yet. Categorize

Class Documentation

Edit documentation

A shared sampler: a GPU sampler state that shaders and shared textures find by name. See X3DSharedData for registration, filtering, register and BindLocation.

Filter. The client builds the filter from filterMin, filterMag, mipFilter, maxAnisotropy and CompareOp. If maxAnisotropy is above 1 and filterMin and filterMag are both linear, the sampler filters anisotropically. If CompareOp is not 1, the sampler is a comparison sampler.

Properties

BorderColor

Color = [0, 0, 0, 255]
Edit documentation

The colour that address mode 3 (Border) returns outside the texture.

CompareOp

U8 = 1
Edit documentation

The comparison function of a comparison sampler:

Value Name
0 Always
1 Never
2 Less
3 LessEqual
4 Greater
5 GreaterEqual
6 Equal
7 NotEqual

1 also turns comparison off: the sampler uses the plain filters. Any other value makes it a comparison sampler.

MaxLod

U32 = 12
Edit documentation

The highest mip level that the sampler reads, in whole levels. mipFilter 0 forces it to 0.

MinLod

U32 = 0
Edit documentation

The lowest mip level that the sampler reads, in whole levels. 0 is the top mip.

addressModeU

U8 = 1
Edit documentation

Address mode along U:

Value Name
0 Wrap
1 Clamp
2 Mirror
3 Border

Values from 4 up read past the client's table and give an undefined mode.

addressModeV

U8 = 1
Edit documentation

Address mode along V. Same values as addressModeU.

addressModeW

U8 = 1
Edit documentation

Address mode along W. Same values as addressModeU.

filterMag

U8 = 1
Edit documentation

Magnification filter. 1 is linear. Any other value is point.

filterMin

U8 = 1
Edit documentation

Minification filter. 1 is linear. Any other value is point.

maxAnisotropy

U8 = 1
Edit documentation

The maximum anisotropy. A value above 1 turns on anisotropic filtering when filterMin and filterMag are both linear.

mipFilter

U8 = 2
Edit documentation

Filter between mip levels:

Value Name Effect
0 None Point, and MaxLod is forced to 0, so the sampler reads only the top mip
1 Point Point between mip levels
2 Linear Linear between mip levels

Any other value is point.

mipLodBias

I32 = 0
Edit documentation

The bias added to the mip level, in whole levels.

type

U8 = 0
Edit documentation

Purpose not yet identified. The client does not read it when it creates the sampler.

Referenced by 4 classes · 4 properties