public static void UnpackShader( int packedShaderIndex, out int localShaderIndex, out PlayerDrawHelper.ShaderConfiguration shaderType) { shaderType = (PlayerDrawHelper.ShaderConfiguration)(packedShaderIndex / 1000); localShaderIndex = packedShaderIndex % 1000; }
public static int PackShader( int localShaderIndex, PlayerDrawHelper.ShaderConfiguration shaderType) { return(localShaderIndex + (int)shaderType * 1000); }