Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::pixel_texture Namespace Reference

Enumerations

enum class  EWrapMode { Repeat = 0 , ClampToEdge , FlippedClampToEdge }
 
enum class  ESampleMode { Nearest = 0 , Bilinear , Trilinear }
 
enum class  EPixelLayout {
  RGBA = 0 , R , G , B ,
  Monochromatic , A , RG , RGB ,
  BGR , ARGB , ABGR , BGRA
}
 Pixel layout of pixel texture. Represent the ordering of pixel components with respect to a color space. The characters RGB does not mean the pixel is in RGB color space. It simply represents pixel components, using R, G, B as placeholders. More...
 

Functions

float64 uv_to_st_scalar (const float64 inputUV, const EWrapMode wrapMode)
 Transform (u, v) coordinates to (s, t) in [0, 1] according to wrap mode. This overload operates on single channel only. The transformation will preserve texel density as it originally is (e.g, no scaling effect).
 
math::Vector2D uv_to_st (const math::Vector2D &inputUV, const EWrapMode wrapModeS, const EWrapMode wrapModeT)
 Transform (u, v) coordinates to (s, t) in [0, 1] according to wrap mode. The transformation will preserve texel density as it originally is (e.g, no scaling effect).
 
std::size_t num_pixel_elements (const EPixelLayout layout)
 
std::size_t alpha_channel_index (const EPixelLayout layout)
 

Enumeration Type Documentation

◆ EPixelLayout

Pixel layout of pixel texture. Represent the ordering of pixel components with respect to a color space. The characters RGB does not mean the pixel is in RGB color space. It simply represents pixel components, using R, G, B as placeholders.

Enumerator
RGBA 
Monochromatic 
RG 
RGB 
BGR 
ARGB 
ABGR 
BGRA 

◆ ESampleMode

enum class ph::pixel_texture::ESampleMode
strong
Enumerator
Nearest 
Bilinear 
Trilinear 

◆ EWrapMode

enum class ph::pixel_texture::EWrapMode
strong
Enumerator
Repeat 
ClampToEdge 
FlippedClampToEdge 

Function Documentation

◆ alpha_channel_index()

std::size_t ph::pixel_texture::alpha_channel_index ( const EPixelLayout layout)
inline

◆ num_pixel_elements()

std::size_t ph::pixel_texture::num_pixel_elements ( const EPixelLayout layout)
inline

◆ uv_to_st()

math::Vector2D ph::pixel_texture::uv_to_st ( const math::Vector2D & inputUV,
const EWrapMode wrapModeS,
const EWrapMode wrapModeT )
inline

Transform (u, v) coordinates to (s, t) in [0, 1] according to wrap mode. The transformation will preserve texel density as it originally is (e.g, no scaling effect).

◆ uv_to_st_scalar()

float64 ph::pixel_texture::uv_to_st_scalar ( const float64 inputUV,
const EWrapMode wrapMode )
inline

Transform (u, v) coordinates to (s, t) in [0, 1] according to wrap mode. This overload operates on single channel only. The transformation will preserve texel density as it originally is (e.g, no scaling effect).