1. A method for compiling of a shading process of a 3D computer graphics, utilized to generate a hardware machine code corresponding to a script, comprising: providing an operation mapping code indicating an operation of the script, and an argument mapping code indicating an argument associated with the operation; and generating the hardware machine code by performing a bitwise OR operation to the operation mapping code and the argument mapping code.