CauldronGPU.Texture (CauldronGPU v0.3.3)

Copy Markdown View Source

A picture to upload. pixels is width * height pixels, rows from the top: four bytes RGBA for :srgb (colour pictures) and :linear (data such as roughness), eight bytes (four little-endian half floats) for :rgba16f.

CauldronGPU.Texture.checker(64, 8, {255, 255, 255, 255}, {40, 40, 40, 255})

Summary

Functions

A size×size checkerboard of squares squares a side, in two RGBA colours.

Types

format()

@type format() :: :srgb | :linear | :rgba16f

t()

@type t() :: %CauldronGPU.Texture{
  filter: :nearest | :linear,
  format: format(),
  height: pos_integer(),
  mipmaps: boolean(),
  pixels: binary(),
  width: pos_integer(),
  wrap: :repeat | :clamp
}

Functions

checker(size, squares, arg1, arg2, fields \\ [])

@spec checker(pos_integer(), pos_integer(), tuple(), tuple(), keyword()) :: t()

A size×size checkerboard of squares squares a side, in two RGBA colours.