         return prog
 
     reupload: ->
-        @constructor(@context, @data, @scene)
+        @constructor(@context, @data, @material, @layout, @vertex_modifiers)
 
     destroy: ->
         @context.render_manager.gl.deleteProgram @_program

        @users = []
        @group_id = -1
        @double_sided = Boolean @data.double_sided
        @material = null

        var_model_view_matrix = "model_view_matrix"
        var_inv_model_view_matrix = ""

                # GPU_DYNAMIC_SAMPLER_2DBUFFER = 12,
                # And 15 was distance wrongly, it's GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE
                when 14, GPU_DYNAMIC_SAMPLER_2DSHADOW
                    @textures.push render_scene.objects[u.lamp].shadow_texture
                    tex_uniforms.push u.varname
                when 13, GPU_DYNAMIC_SAMPLER_2DIMAGE, GPU_DYNAMIC_SAMPLER_2DBUFFER # 2D image
                    if not u.image?
