esp::gfx::PbrPrecomputedMapShader class

A shader to output the irradiance map, applied in the IBL diffuse part, or the prefiltered environment map, applied in the IBL specular part, based on the user setting.

Public types

enum (anonymous): Magnum::UnsignedInt { ColorOutput = Magnum::Shaders::GenericGL3D::ColorOutput }
enum class Flag: Magnum::UnsignedShort { IrradianceMap = 1 << 0, PrefilteredMap = 1 << 1 }
Flag.
using Position = Magnum::Shaders::GenericGL3D::Position
vertex positions
using Flags = Corrade::Containers::EnumSet<Flag>
Flags.

Constructors, destructors, conversion operators

PbrPrecomputedMapShader(Flags flags) explicit
Constructor.
PbrPrecomputedMapShader(const PbrPrecomputedMapShader&) deleted
Copying is not allowed.
PbrPrecomputedMapShader(PbrPrecomputedMapShader&&) defaulted noexcept
Move constructor.

Public functions

auto operator=(const PbrPrecomputedMapShader&) -> PbrPrecomputedMapShader& deleted
Copying is not allowed.
auto operator=(PbrPrecomputedMapShader&&) -> PbrPrecomputedMapShader& defaulted noexcept
Move assignment.
auto setProjectionMatrix(const Magnum::Matrix4& matrix) -> PbrPrecomputedMapShader&
Set "projection" matrix to the uniform on GPU.
auto setTransformationMatrix(const Magnum::Matrix4& matrix) -> PbrPrecomputedMapShader&
Set modelview matrix to the uniform on GPU modelview = view * model.
auto setRoughness(float roughness) -> PbrPrecomputedMapShader&
auto bindEnvironmentMap(Magnum::GL::CubeMapTexture& texture) -> PbrPrecomputedMapShader&
Bind the environment map cubemap texture.

Protected variables

Flags flags_
int modelviewMatrixUniform_
int projMatrixUniform_
int roughnessUniform_

Enum documentation

enum esp::gfx::PbrPrecomputedMapShader::(anonymous): Magnum::UnsignedInt

Enumerators
ColorOutput

Color shader output. Generic output, present always. Expects three- or four-component floating-point or normalized buffer attachment.

enum class esp::gfx::PbrPrecomputedMapShader::Flag: Magnum::UnsignedShort

Flag.

Enumerators
IrradianceMap

This shader is set to compute the irradiance map

PrefilteredMap

This shader is set to compute the prefiltered environment map

Function documentation

PbrPrecomputedMapShader& esp::gfx::PbrPrecomputedMapShader::setProjectionMatrix(const Magnum::Matrix4& matrix)

Set "projection" matrix to the uniform on GPU.

Returns Reference to self (for method chaining)

PbrPrecomputedMapShader& esp::gfx::PbrPrecomputedMapShader::setTransformationMatrix(const Magnum::Matrix4& matrix)

Set modelview matrix to the uniform on GPU modelview = view * model.

Returns Reference to self (for method chaining)

PbrPrecomputedMapShader& esp::gfx::PbrPrecomputedMapShader::setRoughness(float roughness)

Returns Reference to self (for method chaining)

@breif Set roughness to the uniform on GPU NOTE: Flag::PrefilteredMap MUST be enabled

PbrPrecomputedMapShader& esp::gfx::PbrPrecomputedMapShader::bindEnvironmentMap(Magnum::GL::CubeMapTexture& texture)

Bind the environment map cubemap texture.

Returns Reference to self (for method chaining)