tinypbrt 1.1.1
pbrt-v4 scene file parser for C11 with a header-only C++20 wrapper
Loading...
Searching...
No Matches
Texture

Data Structures

struct  tpbrt_texture_handle_t
 Texture handle. More...
 
struct  tpbrt_texture_bilerp_params_t
 Bilerp texture parameters. More...
 
struct  tpbrt_texture_checkerboard_params_t
 Checkerboard texture parameters. More...
 
struct  tpbrt_texture_constant_params_t
 Constant texture parameters. More...
 
struct  tpbrt_texture_direction_mix_params_t
 Direction mix texture parameters. More...
 
struct  tpbrt_texture_dots_params_t
 Dots texture parameters. More...
 
struct  tpbrt_texture_fbm_params_t
 FBM texture parameters. More...
 
struct  tpbrt_texture_image_map_params_t
 Image map texture parameters. More...
 
struct  tpbrt_texture_marble_params_t
 Marble texture parameters. More...
 
struct  tpbrt_texture_mix_params_t
 Mix texture parameters. More...
 
struct  tpbrt_texture_ptex_params_t
 PTEX texture parameters. More...
 
struct  tpbrt_texture_scale_params_t
 Scale texture parameters. More...
 
struct  tpbrt_texture_mapping_uv_params_t
 UV texture mapping parameters. More...
 
struct  tpbrt_texture_mapping_spherical_params_t
 Spherical texture mapping parameters. More...
 
struct  tpbrt_texture_mapping_planar_params_t
 Planar texture mapping parameters. More...
 
struct  tpbrt_texture_t
 PBRT texture representation. More...
 
struct  tpbrt_textures_list_t
 List of textures. More...
 

Macros

#define TPBRT_TEXTURE_IDX_INVALID   TPBRT_IDX_INVALID
 Invalid texture index.
 

Typedefs

typedef tpbrt_idx_t tpbrt_texture_idx_t
 Texture index type.
 
typedef tpbrt_texture_fbm_params_t tpbrt_texture_wrinkled_params_t
 Wrinkled texture parameters.
 
typedef tpbrt_texture_fbm_params_t tpbrt_texture_windy_params_t
 Windy texture parameters.
 
typedef tpbrt_texture_mapping_spherical_params_t tpbrt_texture_mapping_cylindrical_params_t
 Cylindrical texture mapping parameters.
 

Enumerations

enum  tpbrt_texture_handle_value_type_t { TPBRT_TEXTURE_HANDLE_VALUE_TYPE_TEXTURE_IDX = 0 , TPBRT_TEXTURE_HANDLE_VALUE_TYPE_SPECTRUM = 1 , TPBRT_TEXTURE_HANDLE_VALUE_TYPE_MAX_NUM = 2 }
 Texture handle value types. More...
 
enum  tpbrt_texture_type_t { TPBRT_TEXTURE_TYPE_FLOAT = 0 , TPBRT_TEXTURE_TYPE_SPECTRUM = 1 , TPBRT_TEXTURE_TYPE_MAX_NUM = 2 }
 Textures types. More...
 
enum  tpbrt_texture_class_t {
  TPBRT_TEXTURE_CLASS_BILERP = 0 , TPBRT_TEXTURE_CLASS_CHECKER_BOARD = 1 , TPBRT_TEXTURE_CLASS_CONSTANT = 2 , TPBRT_TEXTURE_CLASS_DIRECTION_MIX = 3 ,
  TPBRT_TEXTURE_CLASS_DOTS = 4 , TPBRT_TEXTURE_CLASS_FBM = 5 , TPBRT_TEXTURE_CLASS_IMAGE_MAP = 6 , TPBRT_TEXTURE_CLASS_MARBLE = 7 ,
  TPBRT_TEXTURE_CLASS_MIX = 8 , TPBRT_TEXTURE_CLASS_PTEX = 9 , TPBRT_TEXTURE_CLASS_SCALE = 10 , TPBRT_TEXTURE_CLASS_WINDY = 11 ,
  TPBRT_TEXTURE_CLASS_WRINKLED = 12 , TPBRT_TEXTURE_CLASS_MAX_NUM = 13
}
 Texture classes. More...
 
enum  tpbrt_texture_wrap_t { TPBRT_TEXTURE_WRAP_REPEAT = 0 , TPBRT_TEXTURE_WRAP_BLACK = 1 , TPBRT_TEXTURE_WRAP_CLAMP = 2 , TPBRT_TEXTURE_WRAP_MAX_NUM = 3 }
 Texture wrap types. More...
 
enum  tpbrt_texture_filter_t {
  TPBRT_TEXTURE_FILTER_BILINEAR = 0 , TPBRT_TEXTURE_FILTER_EWA = 1 , TPBRT_TEXTURE_FILTER_TRILINEAR = 2 , TPBRT_TEXTURE_FILTER_POINT = 3 ,
  TPBRT_TEXTURE_FILTER_MAX_NUM = 4
}
 Texture filter types. More...
 
enum  tpbrt_texture_encoding_t { TPBRT_TEXTURE_ENCODING_SRGB = 0 , TPBRT_TEXTURE_ENCODING_LINEAR = 1 , TPBRT_TEXTURE_ENCODING_GAMMA = 2 , TPBRT_TEXTURE_ENCODING_MAX_NUM = 3 }
 Texture encoding types. More...
 
enum  tpbrt_texture_mapping_t {
  TPBRT_TEXTURE_MAPPING_UV = 0 , TPBRT_TEXTURE_MAPPING_SPHERICAL = 1 , TPBRT_TEXTURE_MAPPING_CYLINDRICAL = 2 , TPBRT_TEXTURE_MAPPING_PLANAR = 3 ,
  TPBRT_TEXTURE_MAPPING_MAX_NUM = 4
}
 Texture mapping types. More...
 

Functions

tpbrt_error_t tpbrt_get_texture_by_name (const tpbrt_textures_list_t *textures, tpbrt_string_t name, const tpbrt_texture_t **texture)
 Returns pointer to texture with given name.
 
tpbrt_error_t tpbrt_get_texture_by_handle (const tpbrt_textures_list_t *textures, const tpbrt_texture_handle_t *handle, const tpbrt_texture_t **texture)
 Returns pointer to texture to which handle is provided.
 

Detailed Description

Macro Definition Documentation

◆ TPBRT_TEXTURE_IDX_INVALID

#define TPBRT_TEXTURE_IDX_INVALID   TPBRT_IDX_INVALID

Invalid texture index.

Typedef Documentation

◆ tpbrt_texture_idx_t

Texture index type.

◆ tpbrt_texture_wrinkled_params_t

Wrinkled texture parameters.

◆ tpbrt_texture_windy_params_t

Windy texture parameters.

◆ tpbrt_texture_mapping_cylindrical_params_t

Enumeration Type Documentation

◆ tpbrt_texture_handle_value_type_t

Texture handle value types.

Enumerator
TPBRT_TEXTURE_HANDLE_VALUE_TYPE_TEXTURE_IDX 

Texture index.

TPBRT_TEXTURE_HANDLE_VALUE_TYPE_SPECTRUM 

Spectrum.

TPBRT_TEXTURE_HANDLE_VALUE_TYPE_MAX_NUM 

Count of available texture handle value types.

◆ tpbrt_texture_type_t

Textures types.

Enumerator
TPBRT_TEXTURE_TYPE_FLOAT 

Float texture.

TPBRT_TEXTURE_TYPE_SPECTRUM 

Spectrum texture.

TPBRT_TEXTURE_TYPE_MAX_NUM 

Count of available texture types.

◆ tpbrt_texture_class_t

Texture classes.

Enumerator
TPBRT_TEXTURE_CLASS_BILERP 

Bilerp texture.

TPBRT_TEXTURE_CLASS_CHECKER_BOARD 

Checker board texture.

TPBRT_TEXTURE_CLASS_CONSTANT 

Constant texture.

TPBRT_TEXTURE_CLASS_DIRECTION_MIX 

Direction mix texture.

TPBRT_TEXTURE_CLASS_DOTS 

Dots texture.

TPBRT_TEXTURE_CLASS_FBM 

FBM texture.

TPBRT_TEXTURE_CLASS_IMAGE_MAP 

Image map texture.

TPBRT_TEXTURE_CLASS_MARBLE 

Marble texture.

TPBRT_TEXTURE_CLASS_MIX 

Mix texture.

TPBRT_TEXTURE_CLASS_PTEX 

PTEX texture.

TPBRT_TEXTURE_CLASS_SCALE 

Scale texture.

TPBRT_TEXTURE_CLASS_WINDY 

Windy texture.

TPBRT_TEXTURE_CLASS_WRINKLED 

Wrinkled texture.

TPBRT_TEXTURE_CLASS_MAX_NUM 

Count of available texture classes.

◆ tpbrt_texture_wrap_t

Texture wrap types.

Enumerator
TPBRT_TEXTURE_WRAP_REPEAT 

Simply tiles the texture.

TPBRT_TEXTURE_WRAP_BLACK 

Returns black when outside the legal range.

TPBRT_TEXTURE_WRAP_CLAMP 

Always returns the nearest border texel.

TPBRT_TEXTURE_WRAP_MAX_NUM 

Count of available texture wrap types.

◆ tpbrt_texture_filter_t

Texture filter types.

Enumerator
TPBRT_TEXTURE_FILTER_BILINEAR 

Does bilinear sampling of a single MIP level.

TPBRT_TEXTURE_FILTER_EWA 

Uses the high quality but much slower elliptically weighted average algorithm.

TPBRT_TEXTURE_FILTER_TRILINEAR 

Does trilinear interpolation between two MIP levels.

TPBRT_TEXTURE_FILTER_POINT 

Point sampling.

TPBRT_TEXTURE_FILTER_MAX_NUM 

Count of available texture filter types.

◆ tpbrt_texture_encoding_t

Texture encoding types.

Enumerator
TPBRT_TEXTURE_ENCODING_SRGB 

Applies the sRGB nonlinear mapping.

TPBRT_TEXTURE_ENCODING_LINEAR 

Directly maps them, dividing their values by 255.

TPBRT_TEXTURE_ENCODING_GAMMA 

Applies a gamma correction curve with the specified exponent.

TPBRT_TEXTURE_ENCODING_MAX_NUM 

Count of available texture encoding types.

◆ tpbrt_texture_mapping_t

Texture mapping types.

Enumerator
TPBRT_TEXTURE_MAPPING_UV 

Based on the surface's (u,v) parameterization.

TPBRT_TEXTURE_MAPPING_SPHERICAL 

Spherical mapping.

TPBRT_TEXTURE_MAPPING_CYLINDRICAL 

Cylindrical mapping.

TPBRT_TEXTURE_MAPPING_PLANAR 

Planar mapping.

TPBRT_TEXTURE_MAPPING_MAX_NUM 

Count of available texture mapping types.

Function Documentation

◆ tpbrt_get_texture_by_name()

tpbrt_error_t tpbrt_get_texture_by_name ( const tpbrt_textures_list_t *  textures,
tpbrt_string_t  name,
const tpbrt_texture_t **  texture 
)

Returns pointer to texture with given name.

Parameters
texturesList of textures in which searched texture should be.
nameName of the searched texture.
texturePointer in which pointer to texture will be stored (if not found this will be TPBRT_NULL).
Returns
Returns error code (most possible TPBRT_ERROR_NOT_FOUND, TPBRT_ERROR_NONE).

◆ tpbrt_get_texture_by_handle()

tpbrt_error_t tpbrt_get_texture_by_handle ( const tpbrt_textures_list_t *  textures,
const tpbrt_texture_handle_t *  handle,
const tpbrt_texture_t **  texture 
)

Returns pointer to texture to which handle is provided.

Parameters
texturesList of textures in which texture given by handle should be.
handleHandle to texture.
texturePointer in which pointer to texture will be stored (if not found this will be TPBRT_NULL).
Returns
Returns error code (most possible TPBRT_ERROR_NOT_FOUND, TPBRT_ERROR_NONE).