Updated shader class to be instanced-rendering-compatible