Git Product home page Git Product logo

Comments (10)

JMLX42 avatar JMLX42 commented on June 15, 2024 1

Do you need it released or could you use a git dependency for now?

@teoxoy nope. I added the following to Cargo.toml and the changes in #23 do resolve the problem:

[patch.crates-io]
encase = { git = "https://github.com/teoxoy/encase.git", rev = "e35c7793a6126f5677b31bcfeec4ea3701cc2348" }

from encase.

teoxoy avatar teoxoy commented on June 15, 2024

I think this should work. Do you have the nalgebra feature flag of encase switched on?

from encase.

JMLX42 avatar JMLX42 commented on June 15, 2024

@teoxoy yes:

encase = { version = "0.4.1", features = ["nalgebra"] }

from encase.

ScanMountGoat avatar ScanMountGoat commented on June 15, 2024

I'm seeing code for Vector4<T> and vector slices in the nalgebra implementations but not SVector. Is this just a missing implementation?
https://github.com/teoxoy/encase/blob/main/src/impls/nalgebra.rs

from encase.

JMLX42 avatar JMLX42 commented on June 15, 2024

I'm seeing code for Vector4 and vector slices in the nalgebra implementations but not SVector. Is this just a missing implementation?

@ScanMountGoat AFAIK Vector is an alias for SVector:

https://nalgebra.org/docs/user_guide/vectors_and_matrices

  • SVector<T, D> is a statically-sized column vector with D rows, e.g., SVector<f32, 10>.

[...]

Aliases exist for statically-sized vectors and matrices with small dimensions:

  • Vector1 .. Vector6: are column vectors of dimension 1 to 6.

That's why I would expect it to work.

from encase.

teoxoy avatar teoxoy commented on June 15, 2024

I'm seeing code for Vector4 and vector slices in the nalgebra implementations but not SVector. Is this just a missing implementation?

@ScanMountGoat AFAIK Vector is an alias for SVector:

Looking at nalgebra's source:

pub type SVector<T, const D: usize> = Matrix<T, Const<D>, U1, ArrayStorage<T, D, 1>>;
pub type Vector4<T> = Matrix<T, U4, U1, ArrayStorage<T, 4, 1>>;

You are using SVector<f32, 4> and encase uses Vector4<T> - they should point to the same definition.

Do you have a minimum reproducible example?

from encase.

JMLX42 avatar JMLX42 commented on June 15, 2024

Do you have a minimum reproducible example?

@teoxoy here you go:

https://github.com/JMLX42/wgsl_to_wgpu/tree/bug/encase-22/example

from encase.

teoxoy avatar teoxoy commented on June 15, 2024

Ah, I think I figured it out. I haven't updated encase to support nalgebra v0.32, but you request it in Cargo.toml.
You essentially have both versions in your project now.

from encase.

JMLX42 avatar JMLX42 commented on June 15, 2024

Ah, I think I figured it out. I haven't updated encase to support nalgebra v0.32, but you request it in Cargo.toml.

@teoxoy here you go: #23

Not sure if fixes the problem though...

from encase.

teoxoy avatar teoxoy commented on June 15, 2024

The next major release (0.5) will contain the PR. Do you need it released or could you use a git dependency for now?

from encase.

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.