Vertex Attribute error in Shader

    Dec 04 2018 | 3:37 pm
    Hi all, I get this error in the console: GLSL attribute name not valid: 'sizeAttr'
    when declaring a VERTEX_ATTR in my shader with the following code. I have done this already other times and it was working, now suddenly doesn't work in this code. Can you spot the error? I tried also an empty shader and just declaring the vertex attribute gives the error.
    This is the to which the shader is attached: game @draw_mode points @color 0.7 0.7 0. 7 0.7 @shader shady1 @texture particleTex @blend_enable 1 @depth_enable 0 @blend alphaadd
    Thank you for any help!
    <jittershader name="Particles">
    	<param name="tex0"        type="int" default="0" />
    	<param name="size"        type="float" default="0.015" />
    	<param name="sizeAttr"    type="float" state="VERTEX_ATTR" />
    	<param name="view_matrix" type="mat4"  state="VIEW_MATRIX" transform="INVERSE_TRANSPOSE"/>
    	<language name="glsl" version="1.2">
    		<bind param="tex0" program="fp" />
    		<bind param="sizeAttr" program="vp" />
    		<bind param="view_matrix" program="gp" />
    		<bind param="size" program="gp" />
    		<program name="vp" type="vertex">

    • Dec 04 2018 | 5:10 pm
      have you declared the vertex attribute variable in the relevant shader program? e.g. : attribute float sizeAttr; if that's not it, please post the patch and shader and i'll take a look.
      also, in new to Max 8 is an example of this technique. search browser for: custom.vertex.attribute.maxpat
    • Dec 05 2018 | 7:31 pm
      Thank you Rob, for some reason I tried again today and the patch worked. Must have been something getting temporarily screwed in my OpenGL. Thank you a lot!