elasota / convectionkernels Goto Github PK
View Code? Open in Web Editor NEWFast, high-quality texture compression library for many formats
License: Other
Fast, high-quality texture compression library for many formats
License: Other
thirdparty/cvtt/ConvectionKernels_ETC.cpp:3134:55: error: no member named 'sqrt' in namespace 'std'
const float lengthRatio = static_cast(std::sqrt(ca0LengthSq / ca1UNLengthSq));
~~~~~^
Please use #include <cmath>
.
I'm trying to use cvtt::Internal::BC6HComputer::UnpackOne
directly, to decode a BC6H (unsigned) image block by block. With various other decompression libraries (DirectXTex and others) everything seems to work, but cvtt seems to produce "something entirely else". Happens with all BC6H files I tried so far, on both Mac (clang 13) & Windows (vs2022).
Attached the source file (IndoorHDRI001.dds
), what is the expected decoding result (with DirectXTex in this case), IndoorHDRI001-dxtex.hdr
and what I get with cvtt, IndoorHDRI001-convection.hdr
. Github does not allow attaching dds/hdr directly, so they are all in a zip file.
My usage is basically like this:
cvtt::PixelBlockF16 rgba;
for (int i = 0; i < height; i += 4)
{
for (int j = 0; j < width; j += 4)
{
cvtt::Internal::BC6HComputer::UnpackOne(rgba, src, format == DDSFormat::BC6HS);
src += 16;
for (int c = 0; c < 16; ++c) {
float* dst_f = (float*)(dst + (i*width+j)*12 + width*(c/4)*12 + (c&3)*12);
dst_f[0] = half_to_float_fast5(rgba.m_pixels[c][0]);
dst_f[1] = half_to_float_fast5(rgba.m_pixels[c][1]);
dst_f[2] = half_to_float_fast5(rgba.m_pixels[c][2]);
}
}
}
This line should probably use alphaAggError
, not rgbAggError
, to compute the error for the alpha channel:
ConvectionKernels/ConvectionKernels_BC67.cpp
Line 1984 in 30613bb
(found by clang's address sanitizer, since right now the code causes a buffer overflow)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.