Coder Social home page Coder Social logo

Comments (8)

farnoy avatar farnoy commented on June 12, 2024 1

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

Reading matrices from an input stream is very rare. Do you intend this, or do you mean uniform float4x4 mvp?

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

GLSL does not allow matrices as vertex stream elements IIRC.

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

The fix here is to issue an error message that forbids defining a non-uniform matrix typed parameter.

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

The issue here is that the code is being compiled with "column-major" layout, which maps to glsl's "row-major". Can you share you compilation options? Compiling with default row-major layout should get rid of the decoration.

You can also try -emit-spirv-directly and see if it fixes the problem.

from slang.

farnoy avatar farnoy commented on June 12, 2024

My args are -I src/shaders -g3 -line-directive-mode none -entry main -target glsl -force-glsl-scalar-layout -o out.glsl -- shader.slang

I'm not passing the -matrix-layout-row-major option. Are you saying that if I did pass it, there would be no layout(row_major) or layout(column_major) annotations on these GLSL attributes? I may be approaching it incorrectly in that case, since I translated my GLSL's matrix * vector snippets into mul(matrix, vector) in Slang.

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

You need to either pass -matrix-layout-row-major or specify row_major modifier on the parameter.

from slang.

csyonghe avatar csyonghe commented on June 12, 2024

Closing since the matrix layout qualifier should work here. If not, please reopen.

from slang.

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.