Module tex

Source
Expand description

Tex related structs, enums and functions.

§Examples

which are also unit tests:

Tex Tex from file Tex gen_particle SHCubemap

Structs§

SHCubemap
fluent syntax for Texture cubemap https://stereokit.net/Pages/StereoKit/Tex.html
Tex
This is the texture asset class! This encapsulates 2D images, texture arrays, cubemaps, and rendertargets! It can load any image format that stb_image can, (jpg, png, tga, bmp, psd, gif, hdr, pic, ktx2) plus more later on, and you can also create textures procedurally. https://stereokit.net/Pages/StereoKit/Tex.html
TexType
Textures come in various types and flavors! These are bit-flags that tell StereoKit what type of texture we want; and how the application might use it! https://stereokit.net/Pages/StereoKit/TexType.html
_TexT
StereoKit internal type.

Enums§

TexAddress
What happens when the shader asks for a texture coordinate that’s outside the texture?? Believe it or not, this happens plenty often! https://stereokit.net/Pages/StereoKit/TexAddress.html
TexFormat
What type of color information will the texture contain? A good default here is Rgba32. https://stereokit.net/Pages/StereoKit/TexFormat.html
TexSample
How does the shader grab pixels from the texture? Or more specifically, how does the shader grab colors between the provided pixels? If you’d like an in-depth explanation of these topics, check out [this exploration of texture filtering] https://medium.com/@bgolus/sharper-mipmapping-using-shader-based-supersampling-ed7aadb47bec by graphics wizard Ben Golus. https://stereokit.net/Pages/StereoKit/TexSample.html

Functions§

tex_add_zbuffer
tex_addref
tex_asset_state
tex_copy
tex_create
tex_create_color32
tex_create_color128
tex_create_cubemap_file
tex_create_cubemap_files
tex_create_file
tex_create_file_arr
tex_create_mem
tex_create_rendertarget
tex_find
tex_gen_color
tex_gen_cubemap
tex_gen_cubemap_sh
tex_gen_mips
tex_gen_particle
tex_get_address
tex_get_anisotropy
tex_get_cubemap_lighting
tex_get_data
tex_get_format
tex_get_height
tex_get_id
tex_get_mips
tex_get_sample
tex_get_surface
tex_get_width
tex_get_zbuffer
tex_on_load
tex_on_load_remove
tex_release
tex_set_address
tex_set_anisotropy
tex_set_color_arr
tex_set_colors
tex_set_error_fallback
tex_set_fallback
tex_set_id
tex_set_loading_fallback
tex_set_mem
tex_set_sample
tex_set_surface
tex_set_zbuffer

Type Aliases§

TexT
StereoKit ffi type.