SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
979 stars 132 forks source link

assigning signed value to unsigned int #49

Closed robocyte closed 3 years ago

robocyte commented 3 years ago

A materials texture set indices are set to -1 to indicate that no teture is present, but this index is declared as an unsigned int.

https://github.com/SaschaWillems/Vulkan-glTF-PBR/blob/17849c501cc9523ea72e56918c55359512d3406f/src/main.cpp#L226 https://github.com/SaschaWillems/Vulkan-glTF-PBR/blob/17849c501cc9523ea72e56918c55359512d3406f/base/VulkanglTFModel.h#L95

SaschaWillems commented 3 years ago

What's actually wrong about that code? The colorTextureSet member of pushConstBlockMaterial is set to -1, and that is declared as a signed integer.

robocyte commented 3 years ago

Oh, I was looking at the wrong declaration, my bad. Sorry for the noise and thanks for the quick response, Sascha!