vex troubles

   3657   0   0
User Avatar
Member
4 posts
Joined: July 2005
Offline
hello
I have sprites/particles which have the attribute $NUMHIT.
I want to write a shader in vex which will put a different image depending on weather numhit is >0.

In my sprite geometry object I have a grid sop and a pop net sop going into a copy sop. I have then added the createttribute sop ( adding the attribute numhit and making its value $NUMHIT) and finally a shop sop to attach the shader which i have written in vex.

The shader has parameter inputs of 2 colour maps and the parameter numhit. I have put an (if)statement so that if numhit is 1 put the first colour map, else use the other. It compiled fine but when I render i only ever get the first colour map as if numhit is always 0 when i can see clearly that it is not.
Any help would be much apreciated….
I have tried to visualise the attribute with a paint sop but the colour stays constant even when numhit is changing so i think that this might be where the problem lies?
Thanks in advance.
  • Quick Links