Giter Site home page Giter Site logo

Rounding problem about tinyrenderer HOT 3 CLOSED

ssloy avatar ssloy commented on July 17, 2024
Rounding problem

from tinyrenderer.

Comments (3)

ssloy avatar ssloy commented on July 17, 2024

What is the range of your tex coordinates? What does it mean - broken? Can you provide any image?

from tinyrenderer.

osozero avatar osozero commented on July 17, 2024

We use the same model file. When i keep it as Vec3i the image is produced as https://imgur.com/a/s48qDmv. When i debug it, i see so many texture coordinates are rounded 1 or zero. Then i calculate uvP.x1024 and uvP.y1024. The result is as the link.

from tinyrenderer.

ssloy avatar ssloy commented on July 17, 2024

In my code the texture coordinates vary between 0 and 1024 (actually, the image size). If you interpolate the original tex coords (those between 0 and 1), then yes, you need to use floating point.

from tinyrenderer.

Related Issues (20)

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.