Added some shader parameter calculations