Extracted generic methods into Shader