             
             if !source.is_empty && opacity != 0 {
                 
-                let _source = try encoder.alloc_texture()
-                
-                try source.render(encoder: encoder, output: _source)
+                let _source = try source.render(encoder: encoder)
                 
                 if opacity != 1 {
                     try encoder.setOpacity(_source, opacity)
                 }
                 
                 if let clip = clip, !clip.is_empty {
-                    let clip_encoder = try encoder.clip_encoder()
-                    let _clip = try clip_encoder.alloc_texture()
-                    try clip.render(encoder: clip_encoder, output: _clip)
-                    try encoder.clip(_source, _clip)
+                    try encoder.clip(_source, clip.render(encoder: encoder.clip_encoder()))
                 }
                 
                 if isShadow {
-                    
                     let _shadow = try encoder.alloc_texture()
-                    
                     try encoder.shadow(_source, _shadow, (0..<shadowColor.numberOfComponents).map { shadowColor.component($0) }, shadowOffset, shadowBlur)
                     try encoder.blend(_shadow, output, compositingMode, blendMode)
                 }

            return source
        }
        
        override func render<Encoder: DGRendererEncoder>(encoder: Encoder, output: Encoder.Buffer) throws where Encoder.Renderer.Model == Model {
            
            try encoder.copy(encoder.make_buffer(source.pixels), output)
        }
    }

            return nil
        }
        
        func render<Encoder: DGRendererEncoder>(encoder: Encoder) throws -> Encoder.Buffer where Encoder.Renderer.Model == Model {
            let buffer = try encoder.alloc_texture()
            try self.render(encoder: encoder, output: buffer)
            return buffer
        }
        
        func render<Encoder: DGRendererEncoder>(encoder: Encoder, output: Encoder.Buffer) throws where Encoder.Renderer.Model == Model {
            
        }
