VSampler

Represents a server-side graphics memory region for sampling static images.
See also: ScinImageBuffer VTexPos VTextureSize

Description


VSampler is the fundamental image sampling VGen in Scintillator. It takes a ScinImageBuffer id and a position as inputs and produces a VVec4 color output in (red, green, blue, alpha) order. VSamplers can be configured to sample the image buffer in a variety of ways which are documented below.

Supported Rates: frame, shape, pixel

Class Methods


VSampler.fr(image, pos)

VSampler.sr(image, pos)

VSampler.pr(image, pos)

Make a VSampler VGen at the requested rate.

Arguments

image

The ScinImageBuffer object to sample or a server-issued image ID integer.

pos

A 2D vector to sample the input image at using the provided filter mode.

Returns:

The sampled color value of image at pos.

dimensions

input

output

image, 2

4