MinZe Posted August 8, 2018 Share Posted August 8, 2018 Hi, I want to pass a vec3 array from my babylon code to my shader, but I cannot see anything related. I've seen floats arrays and color3 arrays, but with the first one i'd have to parse them to vec3 (which I do not want) and the second one I don't know If it would work correctly (I'm new to babylonjs) Thanks. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 8, 2018 Share Posted August 8, 2018 Hello i'm really not sure, what you are trying to archive. Can you please create a playground. Thank you. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 8, 2018 Share Posted August 8, 2018 you can pass Color3 directly to shader. here we are changing a uniform from black to white in grayscale: https://doc.babylonjs.com/api/classes/babylon.shadermaterial#setcolor3 https://www.babylonjs-playground.com/#15249P#10 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.