66#define __NBL_ASSET_I_SAMPLER_H_INCLUDED__
77
88#include " nbl/asset/IDescriptor.h"
9+ #include " nbl/builtin/hlsl/enums.hlsl"
910
1011namespace nbl
1112{
@@ -16,23 +17,7 @@ class ISampler : public IDescriptor
1617{
1718 public:
1819 // ! Texture coord clamp mode outside [0.0, 1.0]
19- enum E_TEXTURE_CLAMP
20- {
21- // ! Texture repeats
22- ETC_REPEAT = 0 ,
23- // ! Texture is clamped to the edge pixel
24- ETC_CLAMP_TO_EDGE,
25- // ! Texture is clamped to the border pixel (if exists)
26- ETC_CLAMP_TO_BORDER,
27- // ! Texture is alternatingly mirrored (0..1..0..1..0..)
28- ETC_MIRROR,
29- // ! Texture is mirrored once and then clamped to edge
30- ETC_MIRROR_CLAMP_TO_EDGE,
31- // ! Texture is mirrored once and then clamped to border
32- ETC_MIRROR_CLAMP_TO_BORDER,
33-
34- ETC_COUNT
35- };
20+ using E_TEXTURE_CLAMP = hlsl::TextureClamp;
3621
3722 enum E_TEXTURE_BORDER_COLOR
3823 {
@@ -75,11 +60,11 @@ class ISampler : public IDescriptor
7560 {
7661 struct {
7762 // ! Valeus taken from E_TEXTURE_CLAMP
78- uint32_t TextureWrapU : 3 = ETC_REPEAT;
63+ uint32_t TextureWrapU : 3 = E_TEXTURE_CLAMP:: ETC_REPEAT;
7964 // ! Valeus taken from E_TEXTURE_CLAMP
80- uint32_t TextureWrapV : 3 = ETC_REPEAT;
65+ uint32_t TextureWrapV : 3 = E_TEXTURE_CLAMP:: ETC_REPEAT;
8166 // ! Valeus taken from E_TEXTURE_CLAMP
82- uint32_t TextureWrapW : 3 = ETC_REPEAT;
67+ uint32_t TextureWrapW : 3 = E_TEXTURE_CLAMP:: ETC_REPEAT;
8368 // ! Values taken from E_TEXTURE_BORDER_COLOR
8469 uint32_t BorderColor : 3 = ETBC_FLOAT_OPAQUE_BLACK;
8570 // ! Values taken from E_TEXTURE_FILTER
0 commit comments