CN115880410A - Processing method and device of shader, electronic equipment and program product - Google Patents
Processing method and device of shader, electronic equipment and program product Download PDFInfo
- Publication number
- CN115880410A CN115880410A CN202211612444.1A CN202211612444A CN115880410A CN 115880410 A CN115880410 A CN 115880410A CN 202211612444 A CN202211612444 A CN 202211612444A CN 115880410 A CN115880410 A CN 115880410A
- Authority
- CN
- China
- Prior art keywords
- shader
- template
- data
- rendering
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title description 21
- 238000009877 rendering Methods 0.000 claims abstract description 166
- 230000000694 effects Effects 0.000 claims abstract description 127
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000012545 processing Methods 0.000 claims description 22
- 238000004891 communication Methods 0.000 claims description 15
- 230000004044 response Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 5
- 230000004048 modification Effects 0.000 claims description 4
- 238000012986 modification Methods 0.000 claims description 4
- 238000004806 packaging method and process Methods 0.000 claims 1
- 230000000875 corresponding effect Effects 0.000 description 32
- 238000004364 calculation method Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 12
- 238000012937 correction Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 239000000284 extract Substances 0.000 description 8
- 239000012634 fragment Substances 0.000 description 8
- 230000009466 transformation Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000001795 light effect Effects 0.000 description 6
- 239000003086 colorant Substances 0.000 description 5
- 238000011160 research Methods 0.000 description 5
- 239000000463 material Substances 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000005286 illumination Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 239000011800 void material Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007499 fusion processing Methods 0.000 description 1
- 235000021384 green leafy vegetables Nutrition 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000037361 pathway Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Landscapes
- Image Generation (AREA)
Abstract
In the method, the electronic device may obtain a first shader, where the first shader includes at least one target data: attribute data, vertex shader data, and pixel shader data of the map element; extracting at least one target data in a first shader; generating a second shader from the at least one target data and a shader template, the shader template comprising: rendering the map element into rendering data with a preset effect based on the at least one target data, wherein the second shader is used for rendering the map element into the preset effect. The generation efficiency of the shader can be improved.
Description
Technical Field
The present application relates to the field of map processing technologies, and in particular, to a processing method and apparatus for a shader, an electronic device, and a program product.
Background
A shader (shader) is used to implement image rendering and refers to a set of instructions for an electronic device to use when performing an image rendering task. Illustratively, shaders, for example, may be used to compute color shading of an image, etc.
In the field of maps, there are scenes where multiple elements in a map need to be rendered to the same effect. Currently, for each element that needs to be rendered to the same effect, developers need to write a shader for each element, and the generation efficiency of the shader is low.
Disclosure of Invention
The application provides a processing method and device of a shader, an electronic device and a program product, which can improve the generation efficiency of the shader.
In a first aspect, the present application provides a processing method for a shader, the method including:
obtaining a first shader, the first shader including at least one target data: attribute data, vertex shader data, and pixel shader data of the map element; extracting the at least one target data in the first shader; generating a second shader from the at least one target data and a shader template, the shader template comprising: rendering the map element to rendering data of a preset effect based on the at least one target data, the second shader to render the map element to the preset effect.
In a second aspect, the present application provides a processing apparatus of a shader, the apparatus comprising:
a processing module to obtain a first shader, the first shader including at least one target data: attribute data, vertex shader data, and pixel shader data of the map element; extracting the at least one target data in the first shader; a shader generation module, configured to generate a second shader according to the at least one target data and a shader template, where the shader template includes: rendering the map element to rendering data of a preset effect based on the at least one target data, the second shader to render the map element to the preset effect.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory; the processor is in communication connection with the memory;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method according to any one of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method of any of the first aspects.
The application provides a processing method and device of a shader, an electronic device and a program product, wherein a shader template can be preset, the shader template comprises rendering data for rendering a map element into a preset effect based on at least one target data, a user only needs to write part of codes of each map element, such as attribute data, vertex shader data and pixel shader data of different map elements, and the like, rendering data do not need to be written repeatedly for each map element, and the electronic device can generate a second shader for rendering the map element into the preset effect according to a first shader and the shader template. According to the method and the device, on the basis of generating the shader, for the map elements which need to be rendered into the same effect, a user only needs to write one set of shader templates and write data of the difference part of each map element, rendering data do not need to be written repeatedly for each map element, writing workload of the user can be reduced, and generation efficiency of the shader is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a flow chart illustrating a processing method of a shader provided herein;
FIG. 2 is a schematic interface diagram of an electronic device provided herein;
FIG. 3 is a schematic flow chart of generating a second shader provided herein;
FIG. 4 is a schematic view of a scenario in which the processing method of the shader provided in the present application is applied;
FIG. 5 is a schematic flow chart illustrating a processing method of a shader provided in the present application;
FIG. 6 is a schematic flow chart illustrating a processing method of a shader provided herein;
FIG. 7 is a schematic flow chart illustrating a processing method of a shader provided herein;
FIG. 8 is a schematic diagram of a processing device of a shader provided herein;
fig. 9 is a schematic hardware structure diagram of an electronic device provided in the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. The drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the concepts of the application by those skilled in the art with reference to specific embodiments.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following first explains a concept of partial nouns to which the present application relates:
the electronic device in the embodiment of the present application may be any device having a processing function, such as a terminal or a server, and the form of the electronic device is not limited in the embodiment of the present application.
Map elements: elements in the map may include, but are not limited to, malls, office buildings, restaurants, supermarkets, amusement parks, scenic spots, bus stops, greens, rivers, and the like.
Effect of map element: the effect of different map elements may be different. Illustratively, the river effect may be a planar effect and the mall effect may be a three-dimensional stereoscopic effect. The embodiment of the present application relates to general effects of different map elements, that is, the same effects of different map elements, which may include but are not limited to: light, shadow, reflection, etc.
For example, taking a light effect as an example, the light effect may be understood as rendering a map element into a lighting effect with a certain angle and a certain brightness.
Shader (shader): an editable program for implementing image rendering, to replace a fixed rendering pipeline, or a shader may be understood as an instruction for an electronic device to use in performing image rendering tasks. In one example, a Graphics Processing Unit (GPU) in an electronic device may run a shader to perform image rendering tasks to effect rendering of an image.
The process pass is as follows: a flow executed to achieve an effect. The flow executed to achieve each effect may be referred to as a pass in this application, for example, when the effect includes light and shadow, the light may correspond to a pass, such as a light pass, and the shadow may correspond to a pass, such as a shadow pass.
A pass may include multiple rendering steps, such as, for example, a shadow pass including: a depth calculation step, a scene calculation step, and the like. The rendering steps included in different passes in the embodiment of the present application are not described in detail, and reference may be made to related descriptions in the prior art.
And pass shader: for rendering map elements into an effect. Illustratively, a pass shader may include: a light pass shader, a shadow pass shader, and the like. The GPU runs the light pass shaders to render the map elements to have light effects, and the GPU runs the shadow pass shaders to render the map elements to have shadow effects.
Rendering the pipeline: for converting raw image data into a two-dimensional pixel output that is colored on a screen of an electronic device. The GPU may run the applet, and then process the data in the rendering pipeline to achieve the rendering of the image. In one example, the applet run by the GPU may be referred to as a shader.
In one example, the rendering pipeline may be referred to as a rendering pipeline. The rendering pipeline may organize the light pass shader and the shadow pass shader together, input the map element, and execute the light pass shader and the shadow pass shader according to an execution sequence of the pass shaders to render the map element into light and shadow effects. That is, the rendering pipeline may organize the shaders corresponding to the effects and execute the shaders corresponding to the effects to achieve rendering of the map elements.
The map client can run a shader to execute the image rendering task, and then the map elements are displayed on the map client. In one embodiment, there are scenes where multiple elements in the map are rendered to the same effect, such as shopping malls, office buildings, restaurants, supermarkets, amusement parks, etc., all rendered to the effect of light, shadows. At present, research personnel need to compile a shader for each map element aiming at the same effect, so that repeated compiling work of the research personnel is increased, and the generation efficiency of the shader is low.
In one example, in order to improve the generation efficiency of the shader, a library of function functions may be packaged, and for the effect required by different map elements, the electronic device calls the function corresponding to the map element. Although the implementation mode can improve the generation efficiency of the colorizer to a certain extent, research personnel need to know the effect supported by the functional function library in advance, and the functional function library needs to provide a plurality of interfaces, so that the electronic equipment can call different functions, and the learning cost of the research personnel is increased.
In addition, in this implementation, because different map elements are rendered to have the same effect with different data, functions corresponding to the different map elements still need to be written in advance, so that the repeated writing work is still increased, and the shader generation efficiency is low. In addition, once the rendering strategy of the map elements changes, the functions corresponding to the map elements need to be rewritten, and the maintenance difficulty is high. It should be understood that the rendering strategy of the map elements may be understood as variations in the data used or rendering steps, etc.
Based on the problems existing in the current map rendering, the application provides a processing method of a shader, which can create a shader template in advance, wherein the shader template comprises rendering data for rendering a map element into a preset effect, so that for the map element to be rendered into the preset effect, a developer only needs to write other data except the rendering data, and an electronic device can generate the shader according to the data written by the developer and the shader template. By the method and the device, repeated writing work of research personnel can be avoided, and the generation efficiency of the shader is improved. In one example, a developer may be a user, who may be understood as a user configuring a shader.
It is to be understood that the preset effect can be understood as an effect of light, shadow, reflection, etc. An execution subject of the processing method of the shader provided by the present application may be any electronic device having a processing function, such as a terminal or a server, and the following embodiments will be described with reference to the electronic device as an example.
The technical solution of the present application will be described in detail with reference to specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a flowchart illustrating a processing method of a shader according to the present application. As shown in fig. 1, the method may include the steps of:
s101, obtaining a first shader, wherein the first shader comprises at least one target data: attribute data, vertex shader data, and pixel shader data of the map element.
The first shader is written by the user. The first shader may include at least one target data: attribute data, vertex shader data, and pixel shader data of the map element. The attribute data, vertex shader data, and pixel shader data of the map element may all be referred to as target data.
In one example, vertex shader data may include vertex shader code (vertex shader), which is responsible for calculations of geometric relationships, etc., of vertices of map elements, and may be performed when a GPU renders the vertices of the map elements. The pixel shader data may include pixel shader code (fragment shader), which is primarily responsible for the computation of pixel colors, etc., and may be executed when the GPU renders pixels on the screen. In one example, a pixel shader may also be referred to as a fragment shader.
In one example, attribute data of a map element may include at least one of: the vertex coordinates, the normal, the texture coordinates, the vertex colors and other information of the map elements, and the transformation matrix, the material, the illumination parameters, the colors and other information. In one example, the attribute data of the map element may further include: attributes of the attribute data, such as whether the vertex coordinates of the map element are in the world coordinate system or in the screen coordinate system. Such as 2-bit, 3-bit or 4-bit vertex coordinates for map elements. In one example, state information can be included in the first shader, which can include attributes of the attribute data.
In one example, the attribute data of the map element may include: attribute information, uniform information, and varying information. Wherein, attribute information may be understood as information used in a vertex shader, for example, attribute information may include vertex data, such as: vertex coordinates, normal, texture coordinates, vertex color, etc. The uniform information may be understood as information commonly used in a vertex shader and a fragment shader, for example, the uniform information may include information such as transformation matrix, material, lighting parameter, and color. The variable information is used for data transmission between the vertex shader and the fragment shader, for example, the vertex shader may modify the value of the variable information, and then the fragment shader uses the value of the variable information.
In one example, the vertex shader data may also include attribute data for map elements, e.g., the vertex shader data may include data for vertices. Or vertex shader code included in the vertex shader data may be used to compute attribute data of map elements, such as vertex data. In one example, the pixel shader data may also include attribute data for map elements, such as transformation matrices, textures, lighting parameters, and color information. Or the pixel shader code included in the pixel shader data can be used for calculating to obtain attribute data of the map element, such as information of a transformation matrix, a material, an illumination parameter, a color and the like.
It is to be understood that the at least one target datum may be understood as: data required for rendering the map elements into preset effects.
The first shaders of different map elements may be different in the case where different map element requirements are rendered to the same effect. Take the example where the first shader includes attribute data of map elements, vertex shader data, and pixel shader data. For example, the first shader of map element 1 may include: attribute data, vertex shader data, and pixel shader data for map element 1, where the attribute data for map element 1 may include vertex coordinates and vertex color. The first shader of map element 2 may include: attribute data of the map element 2, vertex shader data, and pixel shader data, wherein the attribute data of the map element 2 may include texture, lighting parameters, and color.
In some embodiments, the first shaders of the same map element may be different where the same map element needs to be rendered to the same effect. In other words, when the same map element needs to be rendered to a preset effect, the user can write a different first shader. Taking map element 1 as an example, the first shader of map element 1 may include: at least one of attribute data, vertex shader data, and pixel shader data of the map element.
For example, the first shader of map element 1 may include attribute data for the map element. Alternatively, the first shader of map element 1 may include vertex shader code, which may be used to generate attribute data for map element 1. In this way, in the embodiment of the present application, the electronic device may generate the second shader according to the first shaders different from the map element 1, and a process of generating the second shader may refer to relevant descriptions in the following embodiments.
For different map elements, a user can program different first shaders, and for the same map element, the user can program different first shaders as long as data in the first shaders can support rendering of the map element into a preset effect. The embodiment of the application does not limit how the user writes the first shader of the map element.
In some embodiments, the electronic device may receive the first shader input by the user or receive the first shader imported by the user, for example, through an Application Programming Interface (API), or a Graphical User Interface (GUI). For example, a user may program a first shader on the electronic device, and accordingly, the electronic device may retrieve the first shader. In some embodiments, the electronic device may interact with other devices, for example, with a communication interface to receive the first shader from the other devices. For example, a user may write a first shader on another device, and the user may trigger the other device to send the first shader to the electronic device. The embodiment does not limit the manner in which the electronic device acquires the first shader.
In some embodiments, a plurality of first shaders may be pre-stored in the electronic device, for example, the plurality of first shaders are imported into the electronic device for a user. The plurality of first shaders can be stored separately, for example, one first shader is stored in one file. Alternatively, the plurality of first shaders may be stored together, for example, the plurality of first shaders may be stored in a file, and different first shaders may be distinguished by different identifiers. For example, the identifier may be a name or a number of the first shader, and the like, which is not limited in this application.
In this embodiment, a user may select a first shader in the electronic device to trigger the electronic device to acquire the first shader. Fig. 2 is an interface schematic diagram of an electronic device provided in the present application. For example, referring to a in fig. 2, taking an example that one first shader is stored in one file, the electronic device may display names of a plurality of files, such as file 1 and file 2, where each folder includes one first shader. If the user selects file 1, the electronic device may be triggered to obtain the first shader in file 1. It should be understood that fig. 2 illustrates an electronic device as an example of a computer.
S102, extracting at least one target datum from the first shader.
In some embodiments, the electronic device may extract at least one target data in the first shader according to a preset keyword.
In one example, for attribute data of map elements, keywords may include, for example: vertex coordinates, normal, texture coordinates, vertex colors, transformation matrices, materials, illumination parameters, colors, and the like, for extracting attribute data of the map elements in the first shader. In one example, for attribute data of a map element, the keywords may include, for example: attribute, uniform, and varying for extracting attribute data of the map element in the first shader.
In one example, for vertex shader data, the keyword may be vertex (or vertex code), and the keyword for vertex shader data may be set based on vertex shader data included in the first shader, so that the electronic device may extract vertex shader data in the first shader. In one example, for pixel shader data, the keyword can be a fragment (or fragment code), and the keyword for the pixel shader data can be set based on pixel shader data included in the first shader so that the electronic device can extract the pixel shader data in the first shader.
In some embodiments, the user may write the first shader in a preset format. The predetermined format may define a location of the target data in the first shader. Illustratively, the attribute data of the first 10 behavior map elements, the line 11 to line 15 behavior vertex shader data, and the line 16 to line 20 behavior pixel shader data of the first shader are defined as a predetermined format.
In this embodiment, the electronic device may extract at least one target data in the first shader according to the position of the target data in the first shader defined by the preset format.
S103, generating a second shader according to the at least one target data and the shader template, where the shader template includes: rendering the map element into rendering data of a preset effect based on the at least one target data, the second shader being for rendering the map element into the preset effect.
The shader template may include: rendering the map element into rendering data of a preset effect based on the at least one target data. Rendering data may be understood as logic code, and may include depth logic code and scene logic code, for example, in the case of shadow effects. The depth logic code may be operable, when executed, to calculate depth information for the map element, and the scene logic code may be operable, when executed, to calculate scene information for the map element.
It should be understood that, for at least one target data included in the first shader, rendering data for rendering the map element into a preset effect based on the at least one target data is included in the shader template. For example, assuming that one first shader includes data of vertices and another first shader includes information such as transformation matrices and textures, a depth calculation logic code is taken as an example, a shader template may include logic code for calculating depth information of a map element based on data of vertices, and may further include logic code for calculating depth information of a map element based on information such as transformation matrices and textures.
According to the method, the shader templates are preset, namely rendering data (logic codes) for rendering the map elements into preset effects are compiled in advance, so that for the map elements needing to be rendered into the same effect, only one set of shader templates needs to be compiled, and the logic codes do not need to be repeatedly compiled for each map element.
In some embodiments, the electronic device can populate the shader template with at least one target data, generating a second shader. For example, the shader template may define a location to fill in the at least one target data, and the electronic device may fill in the at least one target data into the shader template according to the predefined location. For example, if the second line of the shader template is defined to be filled with the attribute data of the map element, the electronic device may fill the attribute data of the map element into the second line of the shader template after extracting the attribute data of the map element from the first shader. For example, if the shader template defines a second line for filling the data of the vertex in the attribute data of the map element, and the fourth line is for filling the color in the attribute data of the map element, the data of the vertex may be filled into the second line of the shader template and the color may be filled into the fourth line of the shader template after the electronic device extracts the data and the color of the vertex from the first shader.
Fig. 3 is a schematic flowchart of a process for generating a second shader according to the present application. Referring to fig. 3, taking the example that the first shader includes the attribute data, the vertex shader code, and the pixel shader code of the map element, the electronic device may extract the attribute data, the vertex shader code, and the pixel shader code of the map element in the first shader, and fill the attribute data, the vertex shader code, and the pixel shader code of the map element in corresponding positions in the shader template, respectively, to obtain the second shader.
The second shader is used for rendering the map element into a preset effect, in other words, the map element can be rendered into the preset effect when the second shader runs. For example, the GPU may run a second shader such that the GPU may render the map element to a preset effect.
Fig. 4 is a schematic view of a scenario in which the processing method of the shader provided in the present application is applied. Referring to fig. 4, in this scenario, after the electronic device generates the second shader, the second shader may be uploaded to the server. The server may be, for example, a resource server, and/or a publishing server. Fig. 4 illustrates an example of an electronic device as a computer.
When the server comprises the resource server, the resource server can issue the second shader as the resource of the map to the map client, so that the map client can operate the second shader to render map elements when displaying the map, and the map client can display the map elements with preset effects.
When the server comprises the release server, the electronic device can pack the second shader in the map release package and upload the map release package to the release server, and when the map client requests to update the map version, the release server can send the map release package to the map client, so that the map client can operate the second shader in the map release package to update the rendering map elements when displaying the map, and the map client can display the map elements with preset effects. In one example, when the electronic device is a publishing server, the electronic device can package the second shader in a map publishing package and push the map publishing package to a map client.
In the embodiment of the application, a shader template may be preset, the shader template includes rendering data for rendering the map element into a preset effect based on at least one target data, a user only needs to write a partial code of each map element, such as different attribute data, vertex shader data, pixel shader data, and other difference data of the map element, and does not need to write rendering data repeatedly for each map element, and the electronic device may generate a second shader for rendering the map element into the preset effect according to the first shader and the shader template. According to the method and the device, on the basis of generating the shader, for the map elements which need to be rendered into the same effect, a user only needs to write one set of shader template and write difference data related to rendering of each map element, rendering data do not need to be written repeatedly for each map element, writing workload of the user can be reduced, and generation efficiency of the shader is improved.
In addition, a user only needs to write at least one target data without knowing the preset effect which can be provided by the rendering data, and the problem of increasing the learning cost is avoided. In addition, the first shader and the shader template which need to be written by a user are isolated, and the coupling of the first shader and the shader template is reduced.
In some embodiments, a user can modify a shader template on an electronic device, and the electronic device can update the shader template in response to the user's modification operation on the shader template. The process of how the user modifies the shader template is not limited in the embodiment of the present application, and it should be understood that, after the shader template is updated, the electronic device may generate a second shader according to the updated shader template in response to the first shader for providing, and the process may refer to the description in the embodiment shown in fig. 1.
In some embodiments, the preset effects may include at least one, and accordingly, the shader template may include rendering data for rendering the map element into different preset effects based on the at least one target data. For example, rendering data for rendering map elements into different preset effects may be included in one shader template.
In some embodiments, to facilitate maintaining rendering data for different preset effects, rendering data for different preset effects may be arranged in different templates. In this embodiment, at least one shader template may be preset, and the shader template may be a pass shader template, in other words, at least one pass shader template may be preset in the present application, and the following embodiment is described as "at least one pass shader template". Correspondingly, the number of the second shaders can be at least one, wherein the electronic device can obtain the at least one second shader according to the at least one target data and the at least one pass shader template, and the second shader is a pass shader. In other words, the electronic device can obtain the at least one pass shader according to the at least one target data and the at least one pass shader template, which is described as "at least one pass shader" in the following embodiments. Different pass shaders may be used to render the map element into different preset effects, i.e. each second shader is used to render the map element into different preset effects.
Illustratively, the preset effects include: light, shadow, and reflection effects, the shader template may include: a light pass shader stencil, a shadow pass shader stencil, and a reflection pass shader stencil. In this embodiment, if any shader template corresponding to any effect is modified, a user can modify the shader template corresponding to the effect without searching for the position of rendering data of the effect in one shader template and then modifying the position, which is convenient for the user to maintain the shader template.
In some embodiments, the rendering steps that the user can select and attribute data for the map elements can be defined in the pass shader templates. For example, if the map element needs to be rendered into a shadow effect, and data or color information of a vertex needs to be used can be defined in the shadow pass shader template, the user can carry the data and/or the color information of the vertex in the first shader when writing the first shader.
Illustratively, if the map element needs to be rendered into a shadow effect, the shadow pass shader template may include at least one rendering step that renders the map element into a shadow effect, and the shadow pass shader template may define rendering steps that the user may select. If rendering the map element into the shadow effect includes steps 1, 2, and 3, and the shadow pass shader template may define optional step 2, i.e., the user may select to perform step 2 or not perform step 2 when rendering the map element into the shadow effect, and step 2 may be used as a rendering step selectable by the user. For example, step 2 may be a normal correction step, and the accuracy after the normal correction step is performed is better, but the processing effect may be improved and the shadow rendering effect may be achieved without performing the normal correction step.
In this embodiment, the user may program the first shader according to the optional rendering steps defined in the pass shader template and the attribute data of the map element.
Referring to fig. 5, in an embodiment, a processing method of a shader provided by the present application may include the following steps:
s501, obtaining a first shader.
S502, extracting at least one target datum in the first shader.
S501-S502 may refer to the associated descriptions in S101-S102.
S503, filling at least one target data into the target shader template to obtain at least one candidate shader, where the target shader template is included in the at least one shader template.
In one example, a target shader template can be understood as: at least one candidate shader can be referred to as a target pass shader template of the at least one pass shader template. Wherein, the target shader template is included in at least one shader template, which can be understood as: the target pass shader template is included in at least one pass shader template.
In some embodiments, the target pass shader stencil may include each of the at least one pass shader stencil. In this example, the electronic device can populate at least one target data into each pass shader template, resulting in at least one candidate pass shader.
In some embodiments, the user may autonomously select a partial preset effect, in which case the target pass shader template may include a partial pass shader template of the at least one pass shader template.
In one example, referring to fig. 2, the user may select a partial preset effect before selecting file 1, i.e., before triggering the electronic device to obtain the first shader, or the user may select a partial preset effect after selecting file 1. For example, taking the example that the user selects the preset effect after selecting the file 1 as an example, after the user selects the file 1, the electronic device may display an identifier of at least one preset effect for the user to select.
In an example, the electronic device may store a corresponding relationship between a preset effect and an identifier of a pass shader template, where the identifier of the pass shader template may be a name or a number of the preset effect, or a number or a name of the pass shader template. The electronic equipment responds to the operation of the user on the identifier of the at least one preset effect, the preset effect required by the user can be determined, then based on the corresponding relation between the preset effect and the identifier of the pass shader template, the pass shader template corresponding to the effect selected by the user is determined in the at least one pass shader template, and the pass shader template corresponding to the effect selected by the user is used as the target pass shader template.
Referring to b in fig. 2, the at least one preset effect includes: light, shadows, and reflections are examples. If the user selects light and shadow effects, the electronic device can determine that the user needs to render the map elements into the light and shadow effects, and the electronic device can take a light pass shader template and a shadow pass shader template in at least one pass shader template as target pass shader templates.
In one example, after determining the target pass shader stencil, the electronic device can mark the state of the target pass shader stencil as a usable state and mark the states of other ones of the at least one pass shader stencil as unusable states. In this way, the electronic device may determine to use the target pass shader template marked as "usable" based on the state of the at least one pass shader template when generating the second shader.
In this application, the electronic device may fill the target pass shader template with at least one target datum (e.g., each pass shader template of the at least one pass shader template or a user-selected pass shader template) to obtain at least one candidate shader.
In one example, each pass shader template can define a location to fill in at least one target data, and accordingly, the target pass shader template can define a location to fill in at least one target data. The electronic device may fill the at least one target data into a position corresponding to the target pass shader template according to a position predefined by the target pass shader template to obtain at least one candidate pass shader, which may refer to the relevant description in S103.
In one example, each pass shader stencil can include: and filling in the indication of the position of the at least one target datum, and correspondingly, the target pass shader template may include: indication information of a location of at least one target data is filled in. In this example, the electronic device may determine, according to the indication information in the target pass shader template, a position to fill in the at least one target data, and then fill the at least one target data in a position corresponding to the target pass shader template to obtain the at least one candidate pass shader.
In some embodiments, the electronic device can treat the at least one candidate pass shader as the at least one pass shader. In this embodiment, when the GPU runs each pass shader, the corresponding target data may be selected in each pass shader according to the target data that needs to be used for the effect corresponding to each pass shader, and the rendering calculation is performed to render the map element to the preset effect.
In this embodiment, first configuration information indicating target data that needs to be used for a corresponding effect of each pass shader may be preconfigured. In other words, the first configuration information is used to indicate the target data included by each pass shader, i.e., the first configuration information is used to indicate the target data included by each second shader. In this example, because the electronic device fills the target pass shader template with at least one target data, each candidate pass shader includes at least one target data, and the GPU may select, when running each candidate pass shader, a corresponding target data from each candidate pass shader for rendering calculation according to the first configuration information.
Illustratively, if the at least one target data includes data of a vertex and color information, the target data required to be used for configuring the light effect in the first configuration information includes data of a vertex, and the target data required to be used for configuring the shadow effect includes color information. The electronic equipment fills the data and the color information of the vertex into the light pass shader template to obtain a candidate light pass shader, and the electronic equipment fills the data and the color information of the vertex into the shadow pass shader template to obtain a candidate shadow pass shader. Similarly, when the GPU runs the shadow candidate pass shader, the map element can be rendered into a shadow effect based on the color information according to the first configuration information.
S504, target data contained in each candidate shader is adjusted according to the first configuration information to obtain at least one second shader, and the first configuration information is used for indicating the target data contained in each second shader.
In the application, the electronic device may pre-adjust target data included in each candidate pass shader according to the first configuration information to obtain at least one pass shader. Each pass shader is used for rendering the map elements into different preset effects. The electronic equipment can delete data which are not used by the candidate pass shader in the running process of the candidate pass shader and retain the data which are used by the candidate pass shader in the running process of the candidate pass shader according to the first configuration information, and therefore the electronic equipment can obtain the accurate pass shader. In the implementation mode, when the GPU runs the pass shader, the used data does not need to be selected according to the first configuration information, running errors can be avoided, and the rendering speed can be increased.
Illustratively, the at least one target data includes data of vertices and color information, the at least one pass shader template includes a light pass shader template and a shadow pass shader template, the target data required to use for configuring the light effect in the first configuration information includes data of vertices, and the target data required to use for configuring the shadow effect includes color information. The electronic device can fill the data and the color information of the vertex into the light pass shader template to obtain a candidate light pass shader, and the electronic device fills the data and the color information of the vertex into the shadow pass shader template to obtain a candidate shadow pass shader. The electronic equipment can delete color information in the candidate light pass shader according to the first configuration information to obtain the light pass shader, and the electronic equipment can delete data of a vertex in the candidate shadow pass shader to obtain the shadow pass shader.
In the embodiment of the application, at least one pass shader template with at least one effect can be configured in advance, so that the electronic device can obtain at least one pass shader, namely at least one second shader, according to at least one target data and the at least one pass shader template, and the purpose of rendering map elements into different preset effects is achieved. In addition, after the electronic device fills at least one target data into the target pass shader template, the target data included in the candidate pass shader can be adjusted according to the first configuration information, and therefore the accurate pass shader can be obtained.
Rendering the map elements into a preset effect requires multiple rendering steps. Illustratively, taking the shadow effect as an example, the rendering step may include: a normal correction step, a depth calculation step, and a scene calculation step. Correspondingly, each pass shader template includes a set of rendering data, each set of rendering data corresponding to at least one rendering step. Illustratively, the rendering data included in the shadow pass shader template may correspond to three rendering steps, namely, the rendering data in the shadow pass shader template may include rendering data for performing the normal correction step, rendering data for performing the depth calculation step, and rendering data for performing the scene calculation step.
In some embodiments, referring to the embodiment shown in fig. 5, when the electronic device generates at least one pass shader, the electronic device may retain rendering data in the pass shader template, so that when the pass shader is running, the GPU may perform each rendering step included in the pass shader to render the map element to a preset effect.
In some embodiments, the user may also configure the rendering step for each effect autonomously, so that the pass shader may reduce the rendering steps and increase the rendering speed on the basis of rendering the map element to the preset effect. In this embodiment, when writing the first shader, the user may add second configuration information to the first shader, where the second configuration information is used to indicate a rendering step corresponding to rendering data in each pass shader.
In this embodiment, referring to fig. 6, S504 may be replaced with S504A as above:
S504A, adjusting target data included in each candidate shader according to the first configuration information, and adjusting rendering data included in each candidate shader according to the second configuration information to obtain at least one second shader.
The electronic device adjusts the target data included in each candidate pass shader according to the first configuration information, which may refer to the relevant description in S504.
In the application, on the basis of adjusting the target data included in each candidate pass shader, the electronic device may further adjust rendering data included in each candidate pass shader according to the second configuration information to obtain at least one pass shader. The electronic equipment can delete part of rendering data contained in each candidate pass shader according to the second configuration information to obtain one less pass shader.
The second configuration information is used for indicating a rendering step corresponding to rendering data in each pass shader, namely the second configuration information is used for indicating a rendering step corresponding to rendering data in each second shader. Taking at least one pass shader as an example, in an example, the second configuration information may include names of rendering steps that each pass shader needs to execute, or the second configuration information may include names of rendering steps that each pass shader does not need to execute.
In one example, the second configuration information may include: and rendering the state information of the rendering step corresponding to the rendering data in each pass shader. For example, taking the shadow effect as an example, the state information that may include the normal line correction step in the second configuration information is "off" to indicate that the rendering step corresponding to the rendering data in the shadow shader does not include the normal line correction step.
Illustratively, taking the shadow effect as an example, the rendering step corresponding to the rendering data included in the shadow pass shader template includes: a normal correction step, a depth calculation step, and a scene calculation step. The user may configure second configuration information in the first shader, and the state information of the normal correction step in the second configuration information is "off", and based on the second configuration information, the electronic device may delete rendering data corresponding to the normal correction step in the shadow candidate pass shader template, to obtain the shadow pass shader.
In one example, the second configuration information may further include a rendering scheme used by the rendering step corresponding to the rendering data in each pass shader. For example, for the depth calculation step, the depth may be calculated by using a scheme 1 and a scheme 2, the shadow pass shader template includes logic codes of the scheme 1 and the scheme 2, and the user may define the rendering scheme used in the depth calculation step in the second configuration information, and if the scheme 1 is adopted, the electronic device may further delete rendering data corresponding to the scheme 2 in the shadow candidate pass shader template according to the second configuration information, to obtain the shadow pass shader.
In the embodiment of the application, a user can configure the rendering step executed by rendering the map elements into the preset effect and the rendering scheme adopted by the rendering step based on the requirement of the user, and the flexibility is high.
Fig. 7 is a schematic flowchart of another processing method of a shader provided in the present application. Referring to fig. 7, the electronic device may acquire a first shader, and fig. 7 includes, in the first shader: attribute data, vertex shader code, and pixel shader code for map elements are examples.
The attribute data as map elements includes: attribute vec4myAttri;
uniform vec4myUniform;
varying vec4myVarying;
and the number of the first and second groups,
uniform sample2D tax1;
uniform vec4myUniform2;
varying vec4myVarying;
such as vertex shader code, including: void vertex (), last
myVarying=myAttri*myUniform
}
Such as pixel shader code, includes: void fragment (), and
ALBEDO=myVarying*myUniform2
}
in addition, the first shader may include second configuration information, such as render _ state, state1, and state2. Illustratively, if state1 indicates that a depth calculation step needs to be performed, state2 indicates that scheme 1 is specifically adopted for depth calculation.
The electronic device may extract attribute information, uniform information, varying information, vertex shader code, pixel shader code, and second configuration information in the first shader. The second configuration information may include rendering steps corresponding to rendering data in each pass shader and rendering schemes adopted in the rendering steps.
The electronic device may populate the target pass shader template with attribute information, uniform information, varying information, vertex shader code, and pixel shader code. It should be understood that, taking the example of fig. 7 that the target pass shader template includes a pass1 shader template and a pass1 shader template, the electronic device may obtain the candidate pass1 shader and the candidate pass2 shader after filling attribute information, uniform information, varying information, vertex shader code, and pixel shader code into the target pass shader template.
In addition, the electronic device may adjust target data included in the pass1 shader template and the pass1 shader template according to the first configuration information, and adjust rendering data included in the pass1 shader template and the pass1 shader template according to the second configuration information to obtain a pass1 shader and a pass2 shader, as shown in fig. 7. It should be understood that the code shown in FIG. 7 is an illustration and is not to be construed as limiting the present application.
In summary, the processing method of the shader provided by the present application may include the following steps:
step 1: shader templates are established, which may include at least one pass shader template.
a, determining a total rendering flow based on at least one pass shader template, wherein the total rendering flow comprises light effects and shadow effects.
In one example, a user may select a target pass shader template, that is, the application may control pass state of the pass shader template, such as marking the pass shader template as usable or unusable, which may be used for turning on or off different passes.
And c, a user can write a first shader according to the pass shader template, for example, the first shader can comprise attribute information, uniform information, varying information and the like. In addition, rendering steps which can be selected by a user and attribute data of map elements can be defined in the pass shader templates, and the rendering steps corresponding to the rendering data in each pass shader template, rendering schemes adopted by the rendering steps and the like can be configured based on the pass shader templates.
And 2, step: and writing a first shader according to the shader template.
The user can program the first shader, the first shader comprises at least one target data, the user can also configure rendering steps corresponding to the rendering data in each pass shader template in the first shader, rendering schemes adopted in the rendering steps and the like, namely second configuration information is added to the first shader. For example, the state information of the rendering step can be configured for different pass shaders to achieve the configuration of the rendering step.
And step 3: and (5) fusion process.
a, the electronic device extracts second configuration information, attribute information, uniform information, varying information, vertex shader code, and pixel shader code in the first shader.
And b, the electronic equipment injects attribute information, uniform information, varying information, vertex shader codes and pixel shader codes into a target pass shader template to obtain at least one candidate pass shader.
And c, traversing the target pass shaders according to the first configuration information, adjusting target data in each candidate pass shader, and adjusting rendering data in each candidate pass shader according to the second configuration information to obtain at least one pass shader. It should be appreciated that each pass shader may be used by various stages of the rendering pipeline to render map elements to different preset effects.
Fig. 8 is a schematic structural diagram of a processing device of a shader provided in the present application. As shown in fig. 8, the apparatus includes: a processing module 81, a shader generation module 82, and a display module 83. Wherein,
a processing module 81, configured to obtain a first shader, where the first shader includes at least one target data: attribute data, vertex shader data, and pixel shader data of the map element, and extracting at least one target data in a first shader.
A shader generation module 82 configured to generate a second shader based on the at least one target data and a shader template, the shader template including: rendering the map element into rendering data of a preset effect based on the at least one target data, the second shader being for rendering the map element into the preset effect.
In a possible implementation manner, there is at least one shader template, and there is at least one second shader, where each second shader is used to render the map element into different preset effects.
A shader generation module 82, specifically configured to fill at least one target data into a target shader template to obtain at least one candidate shader, where the target shader template is included in at least one shader template; and adjusting target data contained in each candidate shader according to the first configuration information to obtain at least one second shader, wherein the first configuration information is used for indicating the target data contained in each second shader.
In a possible implementation manner, each shader template includes a set of rendering data, each set of rendering data corresponds to at least one rendering step, and the first shader further includes second configuration information, where the second configuration information is used to indicate the rendering step corresponding to the rendering data in each second shader.
The shader generating module 82 is specifically configured to adjust target data included in each candidate shader according to the first configuration information, and adjust rendering data included in each candidate shader according to the second configuration information, so as to obtain at least one second shader.
In a possible implementation manner, the display module 83 is configured to display an identifier of at least one preset effect.
The processing module 81 is further configured to determine a target shader template among the at least one shader template in response to a user operation on the identification of the at least one preset effect.
In one possible implementation, the processing module 81 is further configured to mark the state of the target shader template as a usable state, and mark the states of other shader templates in the at least one shader template as an unusable state.
In one possible implementation, each shader template further includes: indication information of a location of at least one target data is filled in. The shader generating module 82 is specifically configured to fill at least one target data into the target shader template according to the indication information in the target shader template.
In one possible implementation, the processing module 81 is further configured to update the shader template in response to a user modification operation on the shader template.
In a possible implementation manner, the processing module 81 is further configured to upload the second shader to a server, where the server is configured to push the second shader to a map client, and the second shader is configured to render the map element into the preset effect by the map client; or, the second shader is packaged in a map distribution package, and the map distribution package is pushed to the map client.
The processing apparatus of the shader provided by the present application is configured to execute the processing method embodiment of the shader, and the implementation principle and the technical effect are similar, which are not described again.
Fig. 9 is a schematic hardware structure diagram of an electronic device provided in the present application. The electronic device 10 shown in fig. 9 comprises a memory 11, a processor 12, a communication interface 13.
The memory 11, the processor 12 and the communication interface 13 are connected with each other in communication. For example, the memory 11, the processor 12, and the communication interface 13 may be connected by a network connection. Alternatively, the electronic device 10 may further include a bus 14. The memory 11, the processor 12 and the communication interface 13 are connected to each other by a bus 14. Fig. 9 is an electronic device 10 in which a memory 11, a processor 12, and a communication interface 13 are communicatively connected to each other via a bus 14.
The Memory 11 may be a Read Only Memory (ROM), a static Memory device, a dynamic Memory device, or a Random Access Memory (RAM). The memory 11 may store programs (computer-executable instructions), and when the programs stored in the memory 11 are executed by the processor 12, the processor 12 and the communication interface 13 are used for executing the processing method of the shader provided in the present application.
The processor 12 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), a Graphics Processing Unit (GPU), or one or more Integrated circuits.
The processor 12 may also be an integrated circuit chip having signal processing capabilities. In implementation, the function of the first node of the present application may be performed by an integrated logic circuit of hardware or an instruction in the form of software in the processor 12. The processor 12 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, or discrete hardware components, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application below. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments described below may be embodied directly in the hardware decoding processor, or in a combination of the hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 11, and the processor 12 reads the information in the memory 11, and completes the functions of the electronic device of the present application in combination with the hardware thereof.
The communication interface 13 enables communication between the electronic device 10 and other devices or communication networks using transceiver modules such as, but not limited to, transceivers. For example, a first shader may be acquired through the communication interface 13.
When electronic device 10 includes bus 14, bus 14 may include a pathway for communicating information between various components of electronic device 10 (e.g., memory 11, processor 12, communication interface 13).
In one example, the electronic device 10 may further include a display screen 15, the display screen 15 being used to display an interface of the electronic device 10. In one example, the display screen 15 may be considered a screen of the electronic device 10.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer-readable storage medium stores program instructions, and the program instructions are used in the method in the foregoing embodiments.
The present application also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instruction from the readable storage medium, and the execution of the execution instruction by the at least one processor causes the electronic device to implement the processing method of the shader provided in the various embodiments described above.
The term "plurality" herein refers to two or more. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and succeeding related objects are in a relationship of "division". In addition, it is to be understood that the terms first, second, etc. in the description of the present application are used for distinguishing between the descriptions and not necessarily for describing a sequential or chronological order.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.
Claims (11)
1. A method for processing a shader, the method comprising:
obtaining a first shader, the first shader including at least one of the following target data: attribute data, vertex shader data, and pixel shader data of the map element;
extracting the at least one target data in the first shader;
generating a second shader from the at least one target data and a shader template, the shader template comprising: rendering the map element to rendering data of a preset effect based on the at least one target data, the second shader to render the map element to the preset effect.
2. The method of claim 1, wherein there is at least one shader template and at least one second shader, each second shader being for rendering the map element to a different preset effect;
generating a second shader according to the at least one target data and a shader template, comprising:
filling the at least one target data into a target shader template to obtain at least one candidate shader, wherein the target shader template is included in the at least one shader template;
and adjusting target data contained in each candidate shader according to first configuration information to obtain at least one second shader, wherein the first configuration information is used for indicating the target data contained in each second shader.
3. The method of claim 2, wherein each shader template includes a set of rendering data, each set of rendering data corresponding to at least one rendering step, the first shader further including second configuration information indicating the rendering step to which the rendering data corresponds in each second shader;
the adjusting, according to the first configuration information, data included in each candidate shader to obtain the at least one shader includes:
and adjusting target data contained in each candidate shader according to the first configuration information, and adjusting rendering data contained in each candidate shader according to the second configuration information to obtain the at least one second shader.
4. The method of claim 2 or 3, wherein before generating the second shader based on the at least one target data and the shader template, further comprising:
displaying an identifier of at least one preset effect;
in response to a user operation on the identification of the at least one preset effect, determining the target shader template among the at least one shader template.
5. The method of claim 4, wherein after determining the target shader template among the at least one shader template, further comprising:
the state of the target shader stencil is marked as a usable state and the states of other ones of the at least one shader stencil are marked as unusable states.
6. The method of any of claims 2-5, wherein each shader template further comprises: filling in an indication of a location of the at least one target data, the filling in the at least one target data into a target shader template, comprising:
and filling the at least one target datum into the target shader template according to the indication information in the target shader template.
7. The method according to any one of claims 1-6, further comprising:
and updating the shader template in response to the modification operation of the user on the shader template.
8. The method of any of claims 1-7, after the generating the second shader, further comprising:
uploading the second shader to a server, the server being configured to push the second shader to a map client, the second shader being configured for the map client to render the map element to the preset effect; or,
and packaging the second shader in a map publishing package, and pushing the map publishing package to the map client.
9. A processing apparatus of a shader, the apparatus comprising:
a processing module to:
obtaining a first shader, the first shader including at least one target data: attribute data, vertex shader data, and pixel shader data of the map element;
extracting the at least one target data in the first shader;
a shader generation module, configured to generate a second shader according to the at least one target data and a shader template, where the shader template includes: rendering the map element to rendering data of a preset effect based on the at least one target data, the second shader to render the map element to the preset effect.
10. An electronic device, comprising: a processor and a memory; the processor is in communication connection with the memory;
the memory stores computer instructions;
the processor executes the computer instructions stored by the memory to implement the method of any of claims 1-8.
11. A computer program product comprising a computer program or instructions, characterized in that the computer program or instructions, when executed by a processor, implement the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211612444.1A CN115880410A (en) | 2022-12-14 | 2022-12-14 | Processing method and device of shader, electronic equipment and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211612444.1A CN115880410A (en) | 2022-12-14 | 2022-12-14 | Processing method and device of shader, electronic equipment and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115880410A true CN115880410A (en) | 2023-03-31 |
Family
ID=85767631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211612444.1A Pending CN115880410A (en) | 2022-12-14 | 2022-12-14 | Processing method and device of shader, electronic equipment and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115880410A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119356682A (en) * | 2024-10-08 | 2025-01-24 | 上海哔哩哔哩科技有限公司 | Code generation method, device, computer readable medium and program product |
-
2022
- 2022-12-14 CN CN202211612444.1A patent/CN115880410A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119356682A (en) * | 2024-10-08 | 2025-01-24 | 上海哔哩哔哩科技有限公司 | Code generation method, device, computer readable medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230053462A1 (en) | Image rendering method and apparatus, device, medium, and computer program product | |
CN107358649B (en) | Processing method and device of terrain file | |
US9495767B2 (en) | Indexed uniform styles for stroke rendering | |
CN110674341A (en) | Special effect processing method and device, electronic equipment and storage medium | |
US20210398331A1 (en) | Method for coloring a target image, and device and computer program therefor | |
KR102171269B1 (en) | Method, apparatus and computer program for coloring of image, Method, apparatus and computer program for learning of artificial neural network | |
US9679398B2 (en) | Rendering images using color contribution values of render elements | |
CN111340704B (en) | Map generation method and device, storage medium and electronic device | |
WO2022100059A1 (en) | Data storage management method, object rendering method, and device | |
CN115880410A (en) | Processing method and device of shader, electronic equipment and program product | |
CN115120966B (en) | Fluid effect rendering method and device | |
US20230325908A1 (en) | Method of providing interior design market platform service using virtual space content data-based realistic scene image and device thereof | |
CN116193050B (en) | Image processing method, device, equipment and storage medium | |
CN111210486B (en) | Method and device for realizing streamer effect | |
US10825200B2 (en) | Texture based pixel count determination | |
CN114307158B (en) | Three-dimensional virtual scene data generation method and device, storage medium and terminal | |
US20250157180A1 (en) | Subject material determination method and apparatus, and electronic device and storage medium | |
CN116863052A (en) | Map drawing method and device based on distributed operating system | |
JP2019164787A (en) | Method and device for efficiently specifying building footprint | |
CN114119825A (en) | Solution method for multi-engine scene visualization surface effect offset jitter and related equipment | |
CN115145565A (en) | A method and device for data visualization large-screen layout based on rule engine | |
CN113487708B (en) | Flow animation implementation method based on graphics, storage medium and terminal equipment | |
AU2023274149B2 (en) | Method for 3D visualization of sensor data | |
US10970894B2 (en) | Filling empty pixels | |
CN111402375A (en) | Method and device for forming shutter effect and rendering engine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |