Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set long arrays or arrays of arrays in Shaders #19

Closed
bil-bas opened this issue Jul 15, 2011 · 1 comment
Closed

Can't set long arrays or arrays of arrays in Shaders #19

bil-bas opened this issue Jul 15, 2011 · 1 comment
Labels
Milestone

Comments

@bil-bas
Copy link
Contributor

bil-bas commented Jul 15, 2011

Although you can pass vec2/3/4 (or integer or boolean arrays up to size 4) you can't pass longer arrays in.
Can't pass arrays of arrays in (such as an array of vec2/3/4).

@Mon-Ouie
Copy link
Owner

Actually, it is possible to set those; and making Ray able to set them from an array would make parsing of arguments much more complicated. We can simply do this instead:

shader["foo[0]"] = 3

0.upto(10) do |i|
  shader["attribute[#{i}]"] = [0, 1, 2]
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants