shadow: fix encoder grid bug