Class Desc


#include <Source/Falcor/Core/API/Sampler.h>

class dlldecl Desc


Descriptor used to create a new Sampler object


setAddressingModeSet the sampler addressing mode
setBorderColorSet the border color
setComparisonModeSet the sampler comparison mode
setFilterModeSet the filter mode
setLodParamsSet the lod clamp parameters
setMaxAnisotropySet the maximum anisotropic filtering value


Lines 66-117 in Source/Falcor/Core/API/Sampler.h.

class dlldecl Desc
    friend class Sampler;
    /** Set the filter mode
        \param[in] minFilter Filter mode in case of minification.
        \param[in] magFilter Filter mode in case of magnification.
        \param[in] mipFilter Mip-level sampling mode
    Desc& setFilterMode(Filter minFilter, Filter magFilter, Filter mipFilter);
    /** Set the maximum anisotropic filtering value. If MaxAnisotropy > 1, min/mag/mip filter modes are ignored
    Desc& setMaxAnisotropy(uint32_t maxAnisotropy);
    /** Set the lod clamp parameters
        \param[in] minLod Minimum LOD that will be used when sampling
        \param[in] maxLod Maximum LOD that will be used when sampling
        \param[in] lodBias Bias to apply to the LOD
    Desc& setLodParams(float minLod, float maxLod, float lodBias);
    /** Set the sampler comparison mode
    Desc& setComparisonMode(ComparisonMode mode);
    /** Set the sampler addressing mode
        \param[in] modeU Addressing mode for U texcoord channel
        \param[in] modeV Addressing mode for V texcoord channel
        \param[in] modeW Addressing mode for W texcoord channel
    Desc& setAddressingMode(AddressMode modeU, AddressMode modeV, AddressMode modeW);
    /** Set the border color. Only applies when the addressing mode is ClampToBorder
    Desc& setBorderColor(const float4& borderColor);
    Filter mMagFilter = Filter::Linear;
    Filter mMinFilter = Filter::Linear;
    Filter mMipFilter = Filter::Linear;
    uint32_t mMaxAnisotropy = 1;
    float mMaxLod = 1000;
    float mMinLod = -1000;
    float mLodBias = 0;
    ComparisonMode mComparisonMode = ComparisonMode::Disabled;
    AddressMode mModeU = AddressMode::Wrap;
    AddressMode mModeV = AddressMode::Wrap;
    AddressMode mModeW = AddressMode::Wrap;
    float4 mBorderColor = float4(0, 0, 0, 0);

Add Discussion as Guest

Log in