Code Monkey home page Code Monkey logo

Comments (5)

raphlinus avatar raphlinus commented on August 31, 2024

This is a very interesting problem, thanks for bringing it to my attention. I will study your solution, but also consider some alternatives. Just to brainstorm, one is to represent the affine transformation using fixed point arithmetic, which should make the math deterministic, but with limitations.

from vello.

eliasnaur avatar eliasnaur commented on August 31, 2024

@raphlinus I'd like to take a stab at implementing your idea of combining transformations in their own monoid in elements.comp. Are you currently (or anyone else) working on this?

Related, is the comment about shared arrays of structs in elements.comp still relevant? If we're going to have two monoid passes, it would be a big readability to work on structs.

FWIW, the malloc functionality (example) uses shared arrays of structs, and I haven't heard you complain.

from vello.

raphlinus avatar raphlinus commented on August 31, 2024

I'm open to you having a crack at it. If you would like to write a brief design doc before digging into the code, I'll try to prioritize it (I've had difficulty switching gears to focus on piet-gpu, but plan for it to be my main work over the next weeks).

I think we can do shared structs now, the bug in the NV shader compiler has been fixed a while ago and we're not at the point where we have to accumulate workarounds for driver bugs - yet.

from vello.

eliasnaur avatar eliasnaur commented on August 31, 2024

Please review #71 which contains an implementation of your separate transformation monoid. It works for me in Gio, and the piet-gpu tiger.

EDIT: I lied. It doesn't always work correctly. Stay tuned.

from vello.

eliasnaur avatar eliasnaur commented on August 31, 2024

Ok, I believe I found a correct (and simpler) fix, a hybrid between your resolved transforms and my tracking of path endpoints. I abandoned the second pass, because I ended up needing both the resolved transformations (for path segments) and the relative transformations (for the bounding box monoid). The new approach keeps a single pass, and doesn't need an end path flag.

Tested with Gio and the piet-gpu tiger.

Please review at #72.

from vello.

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.