Added ETC2 and ASTC texture variants (Refs #174)
This commit is contained in:
parent
8048cd69fd
commit
beed45d5e7
4 changed files with 17 additions and 1 deletions
BIN
data/textures/darkmetal_astc_8x8_unorm.ktx
Normal file
BIN
data/textures/darkmetal_astc_8x8_unorm.ktx
Normal file
Binary file not shown.
BIN
data/textures/darkmetal_etc2_unorm.ktx
Normal file
BIN
data/textures/darkmetal_etc2_unorm.ktx
Normal file
Binary file not shown.
|
|
@ -481,7 +481,23 @@ public:
|
|||
{
|
||||
models.plane.loadFromFile(getAssetPath() + "models/plane.obj", vertexLayout, 0.5f, vulkanDevice, queue);
|
||||
models.example.loadFromFile(getAssetPath() + "models/chinesedragon.dae", vertexLayout, 0.3f, vulkanDevice, queue);
|
||||
textures.colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_bc3.ktx", VK_FORMAT_BC3_UNORM_BLOCK, vulkanDevice, queue);
|
||||
|
||||
// Textures
|
||||
std::string texFormatSuffix;
|
||||
VkFormat texFormat;
|
||||
// Get supported compressed texture format
|
||||
if (vulkanDevice->features.textureCompressionBC) {
|
||||
textures.colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_bc3_unorm.ktx", VK_FORMAT_BC3_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else if (vulkanDevice->features.textureCompressionASTC_LDR) {
|
||||
textures.colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_astc_8x8_unorm.ktx", VK_FORMAT_ASTC_8x8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else if (vulkanDevice->features.textureCompressionETC2) {
|
||||
textures.colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
}
|
||||
}
|
||||
|
||||
void generateQuad()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue