normalized state map and simplified some shaders