Giter Club home page Giter Club logo

convectionkernels's Issues

Use include <cmath>

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>.

BC6H decoder seems to produce broken results

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.

IndoorHDRI001.zip

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]);
        }
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.