Patent attributes
A computer-implemented method, including receiving, through an editor for designing augmented-reality effects, a plurality of shader programs each for an augmented-reality to be rendered for an augmented-reality effect; compiling each of the shader programs of augmented-reality object separately into corresponding shader modules; generate a merged shader module based on the shader modules; analyzing, according to one or more criteria, the merged shader module to identify fragment-shader instructions and vertex-shader instructions; splitting the merged shader module into a single fragment-shader module comprising the identified fragment-shader instructions and a single vertex-shader module comprising the identified vertex-shader instructions; and providing the single fragment-shader module and the single vertex-shader module to a graphics processing unit (GPU) to render the augmented-reality objects.