diff --git a/modules/asset_loader/include/vkcv/asset/asset_loader.hpp b/modules/asset_loader/include/vkcv/asset/asset_loader.hpp index b833268c79540bc24c50e8a8f9334f4760597c43..62f3c8a445190cff6aa178357090e03f1456246d 100644 --- a/modules/asset_loader/include/vkcv/asset/asset_loader.hpp +++ b/modules/asset_loader/include/vkcv/asset/asset_loader.hpp @@ -61,11 +61,15 @@ enum class PrimitiveMode : uint8_t { /** The indices in the index buffer can be of different bit width. */ enum class IndexType : uint8_t { UNDEFINED=0, UINT8=1, UINT16=2, UINT32=3 }; -/* NOTE: glTF defines samplers based on OpenGL, which can not be - * directly translated to Vulkan. The vkcv::asset::Sampler struct defined here - * adheres to the Vulkan spec, having alerady translated the flags from glTF to - * Vulkan. All values here can directly be passed to VkSamplerCreateInfo. - * */ +/** + * This struct defines a sampler for a texture object. All values here can + * directly be passed to VkSamplerCreateInfo. + * NOTE that glTF defines samplers based on OpenGL, which can not be directly + * translated to Vulkan. The vkcv::asset::Sampler struct defined here adheres + * to the Vulkan spec, having alerady translated the flags from glTF to Vulkan. + * Since glTF does not specify border sampling for more than two dimensions, + * the addressModeW is hardcoded to a default: VK_SAMPLER_ADDRESS_MODE_REPEAT. + */ typedef struct { int minFilter, magFilter; int mipmapMode; diff --git a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp index d5e8b9b9aba8ca0ab26c5ce167c473173a5797bf..eaaf1164475e2a17cb3039c3132796cf67af095a 100644 --- a/modules/asset_loader/src/vkcv/asset/asset_loader.cpp +++ b/modules/asset_loader/src/vkcv/asset/asset_loader.cpp @@ -350,9 +350,8 @@ int translateSampler(const fx::gltf::Sampler &src, vkcv::asset::Sampler &dst) dst.addressModeU = translateSamplerMode(src.wrapS); dst.addressModeV = translateSamplerMode(src.wrapT); - // TODO There is no information about wrapping for a third axis in - // glTF... what's a good heuristic we can use to set addressModeW? - // The following hardocded solution is only a temporary hack. + // There is no information about wrapping for a third axis in glTF and + // we have to hardcode this value. dst.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT; return ASSET_SUCCESS;