Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method and device for reducing memory occupation of a Shader module of a mobile game

A mobile game and memory-occupied technology, applied in the field of game software, can solve problems affecting memory size and game frame rate, affecting Shader analysis and compilation time, etc., so as to improve development efficiency and reduce memory occupation

Inactive Publication Date: 2019-06-14
ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD +1
View PDF3 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The number of keywords in Shader directly affects the variant (Variant), and the number of Variant will affect the memory size of ShaderLab, and also affect the parsing and compilation time of Shader, thus affecting the memory size and game frame rate

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for reducing memory occupation of a Shader module of a mobile game

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The idea, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, scheme and effect of the present invention.

[0026] refer to figure 1 , the method according to the present invention comprises the following steps:

[0027] A. Start the Unity editor to find all Shader type resources to obtain their resource list;

[0028] B. Load Shader files one by one according to the resource list;

[0029] C. The interface obtained by reflection calling, the Shader object is passed into the interface as a Boolean parameter, the number of variants of this Shader is obtained by execution, and the number of variants is written into a file to save;

[0030] D. Sort the variants, analyze the Shader files with a large number of variants, and optimize the Shader files with a large number of Shader variants.

[0031] For step C, t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method and device for reducing memory occupation of a Shader module of a mobile game. The method comprises the following steps of starting a Unity editor to search all Shader type resources so as to obtain a resource list of the Shader type resources; loading Shader files one by one according to the resource list; transmitting the Shader object into an interface in a Boolean parameter mode through the interface obtained in a reflection calling mode, executing the step of obtaining the variant number of the Shader, and writing the variant number into a file to be stored; and sorting the variants, analyzing the Shader files with the large number of variants, and optimizing the Shader files with the large Shader variants. The device comprises a memory and a processor, and is configured to implement the method. According to the present invention, the number of the Shader variants is counted, and after the number of the Shader variants is sorted, game developers can optimize files with large variants faster and more accurately, so that the memory occupation of game programs is reduced.

Description

technical field [0001] The invention relates to a method and a device for reducing memory occupation of a Shader module of a mobile phone game, and belongs to the technical field of game software. Background technique [0002] After mobile games have become mainstream, the game has become more and more serious, and the memory usage at runtime is also getting higher and higher. How to reduce the memory size at runtime and improve the frame rate of the game has become an important link that affects the quality of the game. The smaller the memory size, the smaller the probability of being cleared by the system. [0003] In games developed using the Unity engine, the memory occupied by the Shader module occupies part of the memory of the entire game process, and reducing the memory of the Shader module is also an important aspect of reducing game memory. The number of keywords in the Shader directly affects the variant (Variant), and the number of Variant will affect the memory...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06T15/50
Inventor 李星蔡其锋陈凯武张强
Owner ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products