Green-Man Posted September 25, 2013 Share Posted September 25, 2013 Hi! I'm trying to organize some of my vex shaders. And trying to use struct for that. But this kind of code crashes my mantra: struct RayInfo { float clr; }surface structVar(){ RayInfo ray = { 0.0 }; if( ptransform("space:world", P )[2] < 0.0 ) ray.clr = 1.0; Cf = ray.clr;}[/CODE]So, it seems to crash only if try my modify struct non-uniformly.Is it even legal to do like this, or structs are supposed to be constant?Just in case, the compiled .otl version is in the attachment.struct.otl 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.