ShaderGenerator: fix bug in texmat support