mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-21 19:21:17 +02:00
Merge pull request #10560 from birarda/bug/zfox-teeth
fix issue with textures with alpha as a mask
This commit is contained in:
commit
cfbbf3183a
1 changed files with 3 additions and 5 deletions
|
@ -493,10 +493,6 @@ gpu::TexturePointer TextureUsage::process2DTextureColorFromImage(const QImage& s
|
||||||
|
|
||||||
if (validAlpha) {
|
if (validAlpha) {
|
||||||
processTextureAlpha(image, validAlpha, alphaAsMask);
|
processTextureAlpha(image, validAlpha, alphaAsMask);
|
||||||
|
|
||||||
// NOTE: This disables BC1a compression because it was producing odd artifacts on text textures
|
|
||||||
// for the tutorial. Instead we use BC3 (which is larger) but doesn't produce the same artifacts).
|
|
||||||
alphaAsMask = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gpu::TexturePointer theTexture = nullptr;
|
gpu::TexturePointer theTexture = nullptr;
|
||||||
|
@ -506,7 +502,9 @@ gpu::TexturePointer TextureUsage::process2DTextureColorFromImage(const QImage& s
|
||||||
gpu::Element formatGPU;
|
gpu::Element formatGPU;
|
||||||
if (isColorTexturesCompressionEnabled()) {
|
if (isColorTexturesCompressionEnabled()) {
|
||||||
if (validAlpha) {
|
if (validAlpha) {
|
||||||
formatGPU = alphaAsMask ? gpu::Element::COLOR_COMPRESSED_SRGBA_MASK : gpu::Element::COLOR_COMPRESSED_SRGBA;
|
// NOTE: This disables BC1a compression because it was producing odd artifacts on text textures
|
||||||
|
// for the tutorial. Instead we use BC3 (which is larger) but doesn't produce the same artifacts).
|
||||||
|
formatGPU = gpu::Element::COLOR_COMPRESSED_SRGBA;
|
||||||
} else {
|
} else {
|
||||||
formatGPU = gpu::Element::COLOR_COMPRESSED_SRGB;
|
formatGPU = gpu::Element::COLOR_COMPRESSED_SRGB;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue