Nebula
Loading...
Searching...
No Matches
sampler.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11//------------------------------------------------------------------------------
12#include "ids/id.h"
13#include "util/bit.h"
14namespace CoreGraphics
15{
16
18
25
31
40
52
62
64{
76 float minLod;
77 float maxLod;
80
81 const uint32_t HashCode() const
82 {
83 uint32_t res = 0;
84 Util::HashCombine(res, this->magFilter);
85 Util::HashCombine(res, this->minFilter);
86 Util::HashCombine(res, this->mipmapMode);
87 Util::HashCombine(res, this->addressModeU);
88 Util::HashCombine(res, this->addressModeV);
89 Util::HashCombine(res, this->addressModeW);
90 Util::HashCombine(res, this->mipLodBias);
91 Util::HashCombine(res, this->anisotropyEnable);
92 Util::HashCombine(res, this->maxAnisotropy);
93 Util::HashCombine(res, this->compareEnable);
94 Util::HashCombine(res, this->compareOp);
95 Util::HashCombine(res, this->minLod);
96 Util::HashCombine(res, this->maxLod);
97 Util::HashCombine(res, this->borderColor);
98 Util::HashCombine(res, this->unnormalizedCoordinates);
99 return res;
100 }
101};
102
104SamplerId CreateSampler(const SamplerCreateInfo& info);
106void DestroySampler(const SamplerId& id);
107
108} // namespace CoreGraphics
Implements helper functions for checking bits.
#define ID_24_8_TYPE(x)
Definition id.h:132
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
SamplerBorderMode
Definition sampler.h:54
@ FloatOpaqueBlackBorder
Definition sampler.h:57
@ IntTransparentBlackBorder
Definition sampler.h:56
@ FloatTransparentBlackBorder
Definition sampler.h:55
@ IntOpaqueWhiteBorder
Definition sampler.h:60
@ IntOpaqueBlackBorder
Definition sampler.h:58
@ FloatOpaqueWhiteBorder
Definition sampler.h:59
void DestroySampler(const SamplerId &id)
destroy sampler
Definition vksampler.cc:279
SamplerCompareOperation
Definition sampler.h:42
@ EqualCompare
Definition sampler.h:45
@ GreaterOrEqualCompare
Definition sampler.h:48
@ LessCompare
Definition sampler.h:44
@ NotEqualCompare
Definition sampler.h:49
@ AlwaysCompare
Definition sampler.h:50
@ NeverCompare
Definition sampler.h:43
@ GreaterCompare
Definition sampler.h:47
@ LessOrEqualCompare
Definition sampler.h:46
SamplerMipMode
Definition sampler.h:27
@ LinearMipMode
Definition sampler.h:29
@ NearestMipMode
Definition sampler.h:28
SamplerAddressMode
Definition sampler.h:33
@ ClampToEdgeAddressMode
Definition sampler.h:36
@ MirrorClampToEdgeAddressMode
Definition sampler.h:38
@ RepeatAddressMode
Definition sampler.h:34
@ MirroredRepeatAddressMode
Definition sampler.h:35
@ ClampToBorderAddressMode
Definition sampler.h:37
SamplerId CreateSampler(const SamplerCreateInfo &info)
create sampler
Definition vksampler.cc:226
SamplerFilter
Definition sampler.h:20
@ NearestFilter
Definition sampler.h:21
@ CubicFilter
Definition sampler.h:23
@ LinearFilter
Definition sampler.h:22
void HashCombine(uint32_t &s, const T &v)
Combine hashes.
Definition bit.h:141
Definition sampler.h:64
SamplerBorderMode borderColor
Definition sampler.h:78
SamplerFilter minFilter
Definition sampler.h:66
float maxLod
Definition sampler.h:77
float maxAnisotropy
Definition sampler.h:73
SamplerAddressMode addressModeU
Definition sampler.h:68
SamplerAddressMode addressModeV
Definition sampler.h:69
bool anisotropyEnable
Definition sampler.h:72
SamplerMipMode mipmapMode
Definition sampler.h:67
const uint32_t HashCode() const
Definition sampler.h:81
float minLod
Definition sampler.h:76
SamplerAddressMode addressModeW
Definition sampler.h:70
float mipLodBias
Definition sampler.h:71
bool unnormalizedCoordinates
Definition sampler.h:79
SamplerFilter magFilter
Definition sampler.h:65
bool compareEnable
Definition sampler.h:74
SamplerCompareOperation compareOp
Definition sampler.h:75
Definition sampler.h:17