A declarative high-level pbr surface shading method and electronic device

CN122966813APending Publication Date: 2026-10-23BEIJING WAZIDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611346737.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]上述现有技术中,高级表面效果依赖编译并执行着色器代码或依赖桌面编辑器工具链,与运行时零代码执行架构不匹配,不能满足无代码运行情况下声明式游戏的开发需求

Benefits of technology

[0016]本发明有益效果如下:本发明将声明式游戏中的高级表面效果统一表达为声明式表面着色字段,用户只需声明字段,而不需要编写着色器代码,游戏在运行期不编译、不执行新增着色器代码,只驱动打包时已静态编入的预置着色器的渲染规则即可完成渲染,符合运行时零代码的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966813A_ABST
    Figure CN122966813A_ABST
Patent Text Reader

Abstract

The application discloses a declarative advanced PBR surface shading method and electronic equipment, and the surface of a three-dimensional object is rendered by driving a preset shader through a declarative surface shading field to form a surface shading effect. In the application, advanced surface effects in a declarative game are uniformly expressed as declarative surface shading fields, and a user only needs to declare the fields without writing shader codes. The game can complete rendering by only driving the rendering rules of the preset shader statically compiled during packaging without compiling and executing new shader codes during a running period, thereby meeting the requirement of zero codes during the running period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and declarative game technology, specifically to a declarative advanced PBR surface shading method and electronic device. Background Technology

[0002] Physically Based Rendering (PBR) typically includes diffuse reflection, roughness, metallicity, normals, and occlusion. In existing game engines, achieving surface effects such as varnish, subsurface scattering, clipping, mesh highlighting, and planar shading requires coding methods within the game engine, such as using shader variants, material editor connections, handwritten shader code, decals, or duplicate materials. With the development of AI-generated game technology, declarative games, which combine AI with mainstream game engines like Unreal Engine and Unity, are entering the game industry. In declarative games, users verbally describe the game's state and gameplay to the AI. The AI ​​then translates these descriptions into instructions that the game engine can recognize and execute, which in turn generates the game. Declarative games, using AI, make it possible for individuals without coding experience to develop video games.

[0003] In existing declarative game technologies, PBR surface rendering still requires related code to be compiled. For example, in UnityHDRP (a programmable rendering component built into the Unity game engine), CoatMask and DiffusionProfile need to be compiled during the build phase. Then, the parameters are configured in the graphical interface by the material assets (material assets refer to reusable and manageable material resource files in the game engine). At runtime, new materials with clearcoat require new shaders or scripts to rewrite the material, and new or switched instruction streams are needed at runtime. In the Unreal Engine solution, ClearCoat and Subsurface are implemented by the material editor, and the material map is compiled into shader code. This path does not support on-the-spot generation by players or artificial intelligence, and new instruction streams need to be executed at runtime.

[0004] In the aforementioned prior art, advanced surface effects rely on compiling and executing shader code or on desktop editor toolchains, which are incompatible with runtime zero-code execution architecture and cannot meet the development needs of declarative games in the case of no-code execution. Summary of the Invention

[0005] To address at least some of the technical problems in the prior art, the present invention provides a declarative advanced PBR surface coloring method and an electronic device.

[0006] Specifically, the present invention includes the following.

[0007] In a first aspect, the present invention provides a declarative advanced PBR surface coloring method, the specific technical solution of which is as follows: This includes using declarative surface shading fields to drive preset shaders to render the surface of a 3D object, thereby creating a surface shading effect. The specific steps include: obtaining a declarative surface shading field, which describes the shading effect of the 3D object's surface; mapping the surface shading field to a unified material representation, and validating the surface shading field during loading based on closed-set rules statically compiled during packaging; reading the unified material representation at runtime, and calling the rendering rules of the preset shaders statically compiled during packaging based on the value of the surface shading field, rendering the 3D object's surface without compiling or executing new shader code, thus creating the shading effect.

[0008] The present invention is further improved in that the surface coloring field includes at least one of the following: varnish field, subsurface scattering field, surface-by-surface coloring field, world space clipping field, non-destructive mesh highlighting field, and planar / smooth coloring field.

[0009] The present invention is further improved in that the process of verifying the surface coloring field according to the closed set rules statically programmed during packaging during the loading period includes verifying the value type, value range, enumeration items and mutual exclusion relationships of the surface coloring field.

[0010] The present invention is further improved in that the rendering rules of the preset shader include existing rendering parameters and existing normal routines.

[0011] The invention is further improved in that the varnish field includes varnish strength and varnish roughness; the subsurface scattering field includes subsurface scattering intensity; the per-surface shading field includes a surface material path with subscripts, the subscripts being used to address a specified surface in the inline mesh; the world space clipping field includes the world space plane normal and the offset along the normal; the non-destructive mesh highlighting field includes a preset appearance enumeration, color, intensity, and progress; and the planar / smooth shading field is a build-time field used to select smooth normals or per-surface normals.

[0012] The present invention is further improved in that the process of verifying the surface coloring field according to the closed set rules statically programmed during packaging during the loading period also includes: verifying the subscripts in the surface coloring field, and reporting a coding error when the surface subscript is not less than the number of inline grid surfaces.

[0013] In a further improvement, the varnish field and the subsurface scattering field are disabled by default, and the data structure, binding relationship and rendering parameters of the existing material remain unchanged when not declared.

[0014] In a further improvement, the varnish field uses the same unified runtime material representation across the three writing entry points: material block, geometry description string, and runtime component field.

[0015] In a further improvement of this invention, the world space clipping field includes a clipping normal field and a clipping offset field; the clipping normal field is a vector field, and the clipping offset field is a scalar field.

[0016] The beneficial effects of this invention are as follows: This invention expresses advanced surface effects in declarative games as declarative surface shading fields. Users only need to declare the fields without writing shader code. During game runtime, no new shader code is compiled or executed. The rendering is completed by simply driving the rendering rules of the pre-built shaders that have been statically compiled during packaging, which meets the requirement of zero code at runtime.

[0017] In a second aspect, the present invention provides an electronic device, the specific technical solution of which is as follows: the electronic device includes a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the electronic device to implement the method as described in any of the above.

[0018] It should be noted that the beneficial effects of the technical solution of the second aspect of the present invention and the corresponding possible implementation can be found in the above description of the technical effects of the first aspect and its corresponding possible implementation, and will not be repeated here. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating one embodiment of the method of the present invention; Figure 2 This is a schematic diagram of one embodiment of the electronic device of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the embodiments of this invention will be further described in detail below with reference to the accompanying drawings. The embodiments of this invention can be applied to scenarios such as game engines, 3D content generation systems, and AI-driven content editing systems. In the embodiments of this invention, advanced PBR surface shading effects are described through declarative surface shading fields, without adding new shader code at runtime. At runtime, only the unified material representation is read, driving the existing rendering rules of the pre-built shaders that are statically compiled during packaging.

[0021] Reference Figure 1This invention discloses a declarative advanced PBR surface shading method that uses declarative surface shading fields to drive preset shaders to render the surface of a 3D object, thereby creating a surface shading effect. The specific steps include: obtaining declarative surface shading fields, which describe the shading effect of the 3D object surface; mapping the surface shading fields to a unified material representation, and validating the surface shading fields during loading according to closed-set rules statically compiled during packaging; reading the unified material representation during runtime, and calling the rendering rules of the preset shaders statically compiled during packaging based on the value of the surface shading fields, rendering the 3D object surface without compiling or executing new shader code, thus creating the shading effect. In this embodiment, "without compiling or executing new shader code" means that no new shader code is dynamically compiled during runtime, no new shader programs are loaded, and no shader instruction streams temporarily generated by user configuration are executed. Preset shaders, existing rendering parameters, existing built-in variables, existing overlay channels, existing normal routines, etc., are all statically compiled into the engine during packaging or the build phase. The pre-built shaders in this embodiment of the invention can be understood as a set of surface shaders that already exist and have been compiled during packaging. The unified material representation in this embodiment can be understood as a unified material structure used at runtime. This structure can carry basic PBR parameters, advanced surface shading fields, per-surface shading increments, clipping states, highlight states, shading mode states, etc., and different writing entry points ultimately map to this unified material representation. The closed-set rules in this embodiment refer to the set of field definitions statically compiled during packaging, including field names, field types, value ranges, enumeration items, default values, mutual exclusion relationships, subscript validity, conflict rules, diagnostic codes, etc. In this embodiment, there is no string → instruction or configuration → shader code conversion from surface shading declaration to final GPU shading. In this embodiment, an additional effect is added: a corresponding pre-built shader plus an enumeration item is added, and users can only declare values ​​within the preset field set, thereby reducing errors caused by illegal fields or illegal values.

[0022] Based on the above embodiments, this embodiment further improves upon them. The surface shading field includes at least one of the following: varnish field, subsurface scattering field, per-surface shading field, world space clipping field, non-destructive mesh highlighting field, and planar / smooth shading field. In this embodiment, the above surface shading fields can be declared individually or in combination. Each field is used to describe a more advanced surface treatment effect on top of the base PBR material. The varnish field in this embodiment describes a second layer of clear, high-gloss lobes on top of the base diffuse, metallic, and roughness layers, as well as the independent roughness of these lobes. The subsurface scattering field in this embodiment describes the internal light transmission effect after light passes through a semi-transparent solid. The per-surface shading field in this embodiment is used to independently address and write the material properties such as color, self-illumination, and transparency of a specified surface within an inline mesh (an inline mesh discretizes the entire internal space of an object into small units). The world space clipping field in this embodiment is used to implement solid sectioning, section display, or section animation. The non-destructive mesh highlighting field in this embodiment is used to overlay a glow channel on the entity's own mesh, achieving effects such as selected highlighting, hit flashing white, outline glow, and low-health edge warning. The planar / smooth shading field in this embodiment is used to select between smooth shading with shared vertex average normals and planar shading with face-by-face explosion of normals. In this embodiment, the above surface shading fields are all pure data fields, and they do not represent shader code, string instructions, open scripts, or executable fragments. The values ​​of the above fields are only used to drive existing shaders that have been statically compiled into the engine during the packaging stage, or to call existing normal routines; during runtime, no new shader code is compiled, no new shader text is interpreted, and no new instruction stream is executed. This conforms to the architectural constraints of zero-code execution at runtime and reduces the expression cost and error probability when generating data field by field for artificial intelligence.

[0023] Based on the above embodiment, this embodiment further improves upon the previous one by specifying that the process of validating the surface shading field during the loading phase according to the statically programmed closed-set rules during packaging includes validating the value type, value range, enumeration items, and mutual exclusion relationships of the surface shading field. During the loading phase, before the object or configuration enters the runtime, a complete and determinable pre-validation of the surface shading field is performed according to the statically programmed closed-set rules during packaging. The value type validation is used to confirm whether the field has a specified number of value elements, such as scalar, vector, color, enumeration value, or material path with subscript. Specifically, fields such as varnish strength, varnish roughness, subsurface scattering intensity, and highlight intensity are limited to scalars; the world space clipping normal is limited to a vector; the clipping offset is limited to a scalar; the highlight color or per-surface shading color is limited to a color; and the highlight appearance enumeration and planar / smooth shading fields are limited to enumeration values. The value range check is used to confirm whether the scalar field falls within a valid range, such as varnish strength, varnish roughness, subsurface scattering intensity, high-brightness progress, or high-brightness intensity, where the value is between 0 and 1. The enumeration item check is used to confirm whether the enumeration field belongs to a closed set already included during packaging. The mutual exclusion check is used to check whether there is a combination relationship between fields that is not allowed to occur simultaneously. In this embodiment of the invention, the above check process can output a stable diagnostic code to clearly identify value type errors, range errors, enumeration errors, subscript errors, mutual exclusion conflicts, or parsing errors. If any surface coloring field fails the loading-time closed set check, the surface coloring configuration is rejected from entering the runtime.

[0024] Based on the above embodiment, this embodiment further improves upon the previous one by including existing rendering rules for the pre-defined shaders, which include existing rendering parameters and existing normal routines. The pre-defined shaders in this embodiment refer to a collection of surface shaders that have been statically compiled into the engine during the packaging phase. These are new shaders that are not compiled or generated during runtime. The pre-defined shaders include varnish rendering paths, subsurface scattering rendering paths, world space half-plane fragment discarding paths, non-destructive overlay highlighting paths, and planar / smooth normal paths. The existing rendering parameters in this embodiment include external parameters or uniforms (existing shader parameters) already present in existing shaders. In this embodiment, for varnish effects, existing rendering parameters may include the built-in varnish amount corresponding to varnish intensity and the built-in varnish roughness amount corresponding to varnish roughness; for subsurface scattering effects, existing rendering parameters may include the built-in amount corresponding to subsurface scattering intensity; for world space clipping effects, existing rendering parameters may include the world space plane normal and the signed offset along that normal; for non-destructive mesh highlighting effects, existing rendering parameters may include parameters such as color, intensity, progress, and appearance mode in the overlay channel material. The existing normal routines described in this embodiment of the invention include routines that already exist in the engine or are used to generate or process mesh normals. In this embodiment of the invention, for smooth shading, existing normal routines can calculate average normals based on shared vertices to obtain a continuous and smooth surface appearance; for planar shading, existing normal routines can perform mesh de-welding, exploding the mesh into face-by-face non-shared vertices, and assigning independent planar normals to each face, thereby obtaining a low-polygon hard-edge appearance.

[0025] Based on the above embodiment, this embodiment further improves upon it. The varnish field includes varnish strength and varnish roughness; the subsurface scattering field includes subsurface scattering intensity; the per-surface shading field includes a surface material path with an index, the index being used to address a specified surface in the inline mesh; the world space clipping field includes the world space plane normal and the offset along the normal; the non-destructive mesh highlighting field includes a preset appearance enumeration, color, intensity, and progress; the planar / smooth shading field is a build-time field used to select smooth normals or per-surface normals. This embodiment further clarifies these aspects in conjunction with the previous embodiments' descriptions of the varnish field, subsurface scattering field, per-surface shading field, world space clipping field, non-destructive mesh highlighting field, and planar / smooth shading field. The clear coat field in this embodiment includes two scalar fields: clear coat strength and clear coat roughness. Clear coat strength controls the activation level of the second highlight lobe above the base layer, and its value can be from 0 to 1, where 0 indicates no clear coat layer. Clear coat roughness controls the roughness of the second highlight lobe itself, and its value can also be from 0 to 1, where lower values ​​correspond to a more mirror-like and sharper highlight appearance. In the clear coat field, clear coat strength and clear coat roughness together describe the clear coat layer, allowing users to obtain effects such as wet paint and clear coat over base metallic paint and diffuse reflection layers. The subsurface scattering field in this embodiment includes subsurface scattering intensity, which describes the degree to which light passes through a translucent object and shines through a thin layer. The subsurface scattering field can be from 0 to 1, where 0 indicates no light transmission or that subsurface scattering is not enabled. When the subsurface scattering field is combined with the clear coat field, a clear coat with a softer, internally translucent appearance can be further obtained. The per-surface coloring field in this embodiment includes surface material paths with subscripts, such as material[N].color.r, material[N].color.g, material[N].color.b, material[N].emission.*, material[N].alpha, etc. The subscript N is used to address the material of the Nth surface in the inline mesh; if no subscript is used, the existing behavior is maintained on a single-surface mesh. The world space clipping field in this embodiment includes the world space plane normal and the offset along that normal. The world space plane normal defines the orientation of the clipping half-plane, with the side to be preserved being the half-space pointed to by the normal; the offset represents the signed plane distance from the entity origin along the normal direction, with a default value of 0, indicating that the clipping plane passes through the entity origin. The two fields of the world space clipping field together define a world space half-plane. In this embodiment, the non-destructive mesh highlighting field includes preset visual enumerations, color, intensity, and progress. Among them, the preset appearance enumeration is used to select the highlight appearance that has been preset during packaging, such as edge glow, frosting, electric shock, burning, etc.; color is used to color the highlight; intensity is used to control the highlight gain; progress is used to control the highlight visibility or fade-in / fade-out degree.The aforementioned fields in the non-destructive mesh highlighting field can achieve effects such as selection highlighting, hit feedback, and low-health edge warning without damaging the base material. In this embodiment, the planar / smooth shading field is a build-time field used to select smooth normals or per-face normals. Smooth normals correspond to shared vertex average normals, resulting in a continuous, smooth surface appearance; per-face normals correspond to exploding the mesh face by face and assigning independent normals to each face, resulting in a low-poly, hard-edge appearance.

[0026] Based on the above embodiment, this embodiment further improves upon the previous one by further comprising the following steps: verifying the surface coloring field during loading according to the closed-set rules statically encoded during packaging; and reporting a coding error when the surface index is not less than the number of inline mesh surfaces. In this embodiment, when the mesh uses an inline mesh, the number of surfaces and their order within the mesh can be determined during loading. At this time, the loading-period verifier can compare the index in the surface coloring field with the actual number of surfaces in the inline mesh. If the index number is not less than the number of surfaces, it indicates that the index points to a non-existent surface, and the verifier reports a coding error, thereby preventing out-of-bounds writes or silent failures during runtime. When the mesh is not declared inline and its surface number cannot be fully determined during loading, if the runtime finds that the index is not less than the actual number of surfaces, the write operation is treated as a no-op, and a one-time alarm is generated. In this embodiment, the per-surface coloring field does not require users to manually traverse surfaces or manually maintain multiple sets of materials. For single-surface meshes without subscripts, the whole mesh coloring maintains the existing behavior; for inline meshes without subscripts, the whole mesh coloring can fan out to all surfaces, so that the same color applies to all surfaces; for coloring paths with subscripts, only the corresponding color is written to the material of the corresponding surface itself.

[0027] Based on the above embodiment, this embodiment further improves upon it by disabling the varnish field and the subsurface scattering field by default. When not declared, the existing material's data structure, binding relationships, and rendering parameters remain unchanged. In this embodiment, since varnish intensity, varnish roughness, and subsurface scattering intensity are set to 0 by default when not declared (i.e., the default value is off), the existing material's serialization structure, material binding, and rendering results remain unchanged at the byte level or behavior level when advanced fields such as varnish and subsurface scattering are not introduced, thus ensuring the compatibility of existing content.

[0028] Building upon the aforementioned embodiment, this embodiment further improves upon it by sharing the same unified runtime material representation across the three writing entry points: material block, geometry description string, and runtime component field. In this embodiment, fields such as varnish strength, varnish roughness, and subsurface scattering intensity, regardless of their origin (material block declaration, geometry description string notation in a data table, or runtime component field path writing), are all mapped to the same unified runtime material representation. This unified material representation serves as the common foundation for subsequent closed-set verification, per-surface addressing binding, surface shading bridging, and existing shader uniform push. In the material block entry, users can directly declare varnish strength and varnish roughness; in the geometry description string entry, users can include varnish and subsurface scattering field values ​​in the notation string describing the shape and material; in the runtime component field entry, users can rewrite, interpolate, or bind real-time expressions through component field paths. Although the three entry points have different writing formats, they all point to the same material structure at the underlying level, thus sharing the same default values, verification rules, value ranges, and enumeration constraints.

[0029] Based on the above embodiment, this embodiment further improves upon it by including a clipping normal field and a clipping offset field in the world space clipping field. The clipping normal field is a vector field, and the clipping offset field is a scalar field. In this embodiment, the world space clipping field is carried in the form of a clip component, including a clipping normal field (normal) and a clipping offset field (offset). The clipping normal field is a vector field used to describe the normal direction of the world space clipping plane; the clipping offset field is a scalar field used to describe the signed distance of the clipping plane from the origin of the entity along the normal direction.

[0030] like Figure 2 As shown, an electronic device 300 according to an embodiment of the present invention includes a processor 320 coupled to a memory 310. The memory 310 stores at least one computer program 330, which is loaded and executed by the processor 320 to enable the electronic device 300 to implement any of the above-mentioned methods. Specifically: The electronic device 300 can vary considerably due to differences in configuration or performance. It may include one or more processors 320 (Central Processing Units, CPUs) and one or more memories 310. The one or more memories 310 store at least one computer program 330, which is loaded and executed by the one or more processors 320 to enable the electronic device 300 to implement the methods provided in the above embodiments. Of course, the electronic device 300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The electronic device 300 may also include other components for implementing device functions, which will not be elaborated upon here.

[0031] It should be noted that the terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and do not imply a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of the invention described herein can be implemented in an order other than that shown or described.

[0032] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0033] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0034] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A declarative advanced PBR surface coloring method, characterized in that, This includes using declarative surface shading fields to drive preset shaders to render the surface of 3D objects, thereby creating surface shading effects; The specific steps include: Obtain the declarative surface shading field, which describes the shading effect of the surface of a three-dimensional object; The surface coloring field is mapped to a unified material representation, and the surface coloring field is validated during loading based on the closed-set rules statically compiled during packaging; During runtime, the unified material representation is read, and the rendering rules of the pre-built shaders statically compiled during packaging are called according to the value of the surface shading field. The surface of the 3D object is rendered without compiling or executing any new shader code, thus forming a shading effect.

2. The method according to claim 1, characterized in that, The surface shading fields include at least one of the following: varnish field, subsurface scattering field, surface-by-surface shading field, world space clipping field, non-destructive mesh highlighting field, and planar / smooth shading field.

3. The method according to claim 1, characterized in that, The process of validating the surface coloring field during the loading period according to the closed set rules statically programmed during packaging includes validating the value type, value range, enumeration items, and mutual exclusion relationships of the surface coloring field.

4. The method according to claim 1, characterized in that, The rendering rules of the preset shader include existing rendering parameters and existing normal routines.

5. The method according to claim 2, characterized in that, The varnish field includes varnish strength and varnish roughness; the subsurface scattering field includes subsurface scattering intensity; the per-surface shading field includes a surface material path with subscripts, the subscripts being used to address a specified surface in the inline mesh; the world space clipping field includes the world space plane normal and the offset along the normal; the non-destructive mesh highlighting field includes a preset appearance enumeration, color, intensity, and progress; the planar / smooth shading field is a build-time field used to select smooth normals or per-surface normals.

6. The method according to claim 5, characterized in that, The process of verifying the surface coloring field during the loading period according to the closed set rules statically encoded during packaging also includes: verifying the subscripts in the surface coloring field, and reporting a coding error when the surface subscript is not less than the number of inline mesh surfaces.

7. The method according to claim 2, characterized in that, The varnish field and the subsurface scattering field are disabled by default. When not declared, the data structure, binding relationship and rendering parameters of the existing material remain unchanged.

8. The method according to claim 2, characterized in that, The varnish field uses the same unified runtime material representation across the three writing entry points: material block, geometry description string, and runtime component field.

9. The method according to claim 2, characterized in that, The world space clipping field includes a clipping normal field and a clipping offset field; the clipping normal field is a vector field, and the clipping offset field is a scalar field.

10. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to perform the method as claimed in any one of claims 1 to 9.