Photon Engine 2.0.0-beta
A physically based renderer.
|
Swizzle an array-like input type to the other array-like output type. Output type OutputT
can have any number of elements (no need to be the same as input type InputT
). For any elements in OutputT
that is not part of the swizzle, the value will be as if the element is zero-initialized (or default-initialized depending on the actual type).
More...
#include <TSwizzledTexture.h>
Public Types | |
using | InputTexRes = std::shared_ptr<TTexture<InputT>> |
using | InputElement = std::remove_cvref_t<decltype(std::declval<InputT>()[std::declval<std::size_t>()])> |
using | OutputElement = std::remove_cvref_t<decltype(std::declval<OutputT>()[std::declval<std::size_t>()])> |
Public Types inherited from ph::TTexture< OutputT > | |
using | Output |
Public Member Functions | |
TSwizzledTexture (InputTexRes inputTexture, std::array< uint8, OUTPUT_N > swizzleMap) | |
void | sample (const SampleLocation &sampleLocation, OutputT *const out_value) const override |
Public Member Functions inherited from ph::TTexture< OutputT > | |
TTexture ()=default | |
virtual | ~TTexture ()=default |
Swizzle an array-like input type to the other array-like output type. Output type OutputT
can have any number of elements (no need to be the same as input type InputT
). For any elements in OutputT
that is not part of the swizzle, the value will be as if the element is zero-initialized (or default-initialized depending on the actual type).
OUTPUT_N | Size of the array-like object. Must not exceed number of elements in OutputT . |
using ph::TSwizzledTexture< InputT, OutputT, OUTPUT_N >::InputElement = std::remove_cvref_t<decltype(std::declval<InputT>()[std::declval<std::size_t>()])> |
using ph::TSwizzledTexture< InputT, OutputT, OUTPUT_N >::InputTexRes = std::shared_ptr<TTexture<InputT>> |
using ph::TSwizzledTexture< InputT, OutputT, OUTPUT_N >::OutputElement = std::remove_cvref_t<decltype(std::declval<OutputT>()[std::declval<std::size_t>()])> |
|
inline |
swizzleMap | How each output slot maps to the input slot. Stores indices to the input slots. Indices must not exceed the size of InputT . |
|
inlineoverridevirtual |
Implements ph::TTexture< OutputT >.