     }
     
     public func generate(inj: SpectraInjected, injector: MetalNodeInjector? = nil) -> MTLType {
+        let ninj = injector?(inj) ?? inj
         let desc = MTLType()
         // TODO: reduce over attributes & layouts.  merge injected.options?
         for (idx, node) in self.attributes.enumerate() {
             //TODO: should injector be nil for nested objects? with option to read from inj.options?
-            let attrDesc = node.generate(inj, injector: nil)
+            let attrDesc = node.generate(ninj, injector: nil)
             desc.attributes[idx] = attrDesc
         }
         for (idx, node) in self.layouts.enumerate() {
-            let layoutDesc = node.generate(inj, injector: nil)
+            let layoutDesc = node.generate(ninj, injector: nil)
             desc.layouts[idx] = layoutDesc
         }
         return desc

    }

    public func generate(inj: SpectraInjected, injector: MetalNodeInjector?) -> MTLType {
        let desc = generateRenderPassAttachment(inj, injector: injector)
        if let clearColor = self.clearColor?.generate(inj, injector: injector) {
            desc.clearColor = clearColor

    }

    public func generate(inj: SpectraInjected, injector: MetalNodeInjector?) -> MTLType {
        let ninj = injector?(inj) ?? inj
        let desc = MTLType()
        if let val = self.label { desc.label = val }
        if let val = self.minFilter { desc.minFilter = val }
