     #   }
     #   Data type of each uniform is inferred from the type or the custom value.
     # * varyings: list of varyings, TODO. See loader.coffee:93
-    constructor: (@context, @data, @scene, @layout, vertex_modifiers) ->
+    constructor: (@context, @data, @material, @layout, @vertex_modifiers) ->
         @id = id++
         if @context.all_materials.indexOf(@) == -1
             @context.all_materials.push @

        @shaders = []
        @users = []
        @scene?.materials[@name] = this
        @set_data @data
        @last_shader = null # TODO: workaround for short term compatibility problems


        if @u_mistenable?
            gl.uniform1f @u_mistenable, 0

        @modifier_data_store = for m in @vertex_modifiers
            m.get_data_store gl, prog

        @u_custom = []
