# US 2023/0053462 A1 · Image rendering method and apparatus, device, medium, and computer program product

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0053462 A1
- Document ID: US20230053462A1
- Status: Published application
- Kind: A1
- Application number: 17/983,307
- Filed: 2022-11-08
- Published: 2023-02-23
- Earliest claimed: 2021-03-19
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Guannan XIANG
- Web page: https://patentgrep.com/patent/US20230053462A1

## CPC

- G06T 15/04: Texture mapping
- G06T 7/11: Region-based segmentation
- G06T 7/40: Analysis of texture (depth or shape recovery from texture G06T7/529)
- G06T 15/005: {General purpose rendering architectures}
- G06T 15/80: Shading
- G06V 20/10: Terrestrial scenes (scenes under surveillance with static cameras G06V20/52; scenes perceived from the exterior of a vehicle G06V20/56; scenes perceived from the interior of a vehicle G06V20/59)
- G06T 2207/20164: Salient point detection; Corner detection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Provided is an image rendering method performed by a computer device, the method including: determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture; loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache; determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache, and transmitting the physical texture coordinate to a pixel shader; and sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the image.

## Claims

### Claim 1

An image rendering method performed by a computer device, the method comprising:
determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture;
loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache;
determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache, and transmitting the physical texture coordinate to a pixel shader; and
sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache comprises:
determining, through the vertex shader, a virtual texture coordinate of the virtual texture tile corresponding to the vertex coordinate in a virtual texture coordinate system;
obtaining a virtual texture page table, the virtual texture page table storing a mapping relationship between a virtual texture coordinate and a physical texture coordinate, and the physical texture coordinate being a coordinate of a physical texture in a physical texture coordinate system;
obtaining a physical texture corresponding to each virtual texture tile according to a physical texture coordinate corresponding to the virtual texture coordinate in the virtual texture page table; and
loading the obtained physical texture to the texture cache.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the obtaining a physical texture corresponding to each virtual texture tile according to a physical texture coordinate corresponding to the virtual texture coordinate in the virtual texture page table comprises:
determining the physical texture coordinate of the physical texture corresponding to each virtual texture tile in the virtual texture page table according to the virtual texture coordinate and a virtual texture size of the virtual texture; and
obtaining the physical texture corresponding to each virtual texture tile according to the physical texture coordinate.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
performing, through the vertex shader, scaling transformation processing on a vertex coordinate of each rendering child tile in the virtual texture tile according to a scaling transformation matrix to obtain a local virtual texture coordinate of each rendering child tile after scaling transformation;
determining a starting physical texture coordinate corresponding to the physical texture according to a world coordinate corresponding to the virtual texture tile and a virtual texture coordinate corresponding to the virtual texture tile in a virtual texture page table; and
determining the physical texture coordinate corresponding to each rendering child tile in the texture cache according to the local virtual texture coordinate of each rendering child tile and the starting physical texture coordinate corresponding to the physical texture.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
determining, through a sampling node in the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, the physical texture coordinate corresponding to each rendering child tile in the texture cache; and
the transmitting the physical texture coordinate to a pixel shader comprises:
transmitting, through the sampling node in the vertex shader, the physical texture coordinate to the pixel shader.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
determining, through the vertex shader, a texture request parameter corresponding to each virtual texture tile according to a virtual texture coordinate corresponding to each virtual texture tile; and
transmitting, through the vertex shader, the physical texture coordinate and the texture request parameter to the pixel shader, wherein
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache based on the texture request parameter.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture comprises:
determining, when the image comprises a terrain scene region, a vertex coordinate of a virtual texture tile corresponding to the terrain scene region in the virtual texture; and
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache and rendering, based on the texel, the image comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the terrain scene region in the image.

### Claim 8

A computer device, comprising a memory and one or more processors, the memory storing computer-readable instructions that, when executed by the one or more processors, cause the computer device to perform an image rendering method including:
determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture;
loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache;
determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache, and transmitting the physical texture coordinate to a pixel shader; and
sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the image.

### Claim 9 (depends on 8)

The computer device according to claim 8, wherein the loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache comprises:
determining, through the vertex shader, a virtual texture coordinate of the virtual texture tile corresponding to the vertex coordinate in a virtual texture coordinate system;
obtaining a virtual texture page table, the virtual texture page table storing a mapping relationship between a virtual texture coordinate and a physical texture coordinate, and the physical texture coordinate being a coordinate of a physical texture in a physical texture coordinate system;
obtaining a physical texture corresponding to each virtual texture tile according to a physical texture coordinate corresponding to the virtual texture coordinate in the virtual texture page table; and
loading the obtained physical texture to the texture cache.

### Claim 10 (depends on 9)

The computer device according to claim 9, wherein the obtaining a physical texture corresponding to each virtual texture tile according to a physical texture coordinate corresponding to the virtual texture coordinate in the virtual texture page table comprises:
determining the physical texture coordinate of the physical texture corresponding to each virtual texture tile in the virtual texture page table according to the virtual texture coordinate and a virtual texture size of the virtual texture; and
obtaining the physical texture corresponding to each virtual texture tile according to the physical texture coordinate.

### Claim 11 (depends on 8)

The computer device according to claim 8, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
performing, through the vertex shader, scaling transformation processing on a vertex coordinate of each rendering child tile in the virtual texture tile according to a scaling transformation matrix to obtain a local virtual texture coordinate of each rendering child tile after scaling transformation;
determining a starting physical texture coordinate corresponding to the physical texture according to a world coordinate corresponding to the virtual texture tile and a virtual texture coordinate corresponding to the virtual texture tile in a virtual texture page table; and
determining the physical texture coordinate corresponding to each rendering child tile in the texture cache according to the local virtual texture coordinate of each rendering child tile and the starting physical texture coordinate corresponding to the physical texture.

### Claim 12 (depends on 8)

The computer device according to claim 8, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
determining, through a sampling node in the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, the physical texture coordinate corresponding to each rendering child tile in the texture cache; and
the transmitting the physical texture coordinate to a pixel shader comprises:
transmitting, through the sampling node in the vertex shader, the physical texture coordinate to the pixel shader.

### Claim 13 (depends on 8)

The computer device according to claim 8, wherein the method further comprises:
determining, through the vertex shader, a texture request parameter corresponding to each virtual texture tile according to a virtual texture coordinate corresponding to each virtual texture tile; and
transmitting, through the vertex shader, the physical texture coordinate and the texture request parameter to the pixel shader, wherein
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache based on the texture request parameter.

### Claim 14 (depends on 8)

The computer device according to claim 8, wherein the determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture comprises:
determining, when the image comprises a terrain scene region, a vertex coordinate of a virtual texture tile corresponding to the terrain scene region in the virtual texture; and
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache and rendering, based on the texel, the image comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the terrain scene region in the image.

### Claim 15

One or more non-transitory computer-readable storage media, storing computer-readable instructions that, when executed by one or more processors of a computer device, cause the computer device to implement an image rendering method including:
determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture;
loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache;
determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache, and transmitting the physical texture coordinate to a pixel shader; and
sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the image.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage media according to claim 15, wherein the loading, through a vertex shader, a physical texture corresponding to the vertex coordinate to a texture cache comprises:
determining, through the vertex shader, a virtual texture coordinate of the virtual texture tile corresponding to the vertex coordinate in a virtual texture coordinate system;
obtaining a virtual texture page table, the virtual texture page table storing a mapping relationship between a virtual texture coordinate and a physical texture coordinate, and the physical texture coordinate being a coordinate of a physical texture in a physical texture coordinate system;
obtaining a physical texture corresponding to each virtual texture tile according to a physical texture coordinate corresponding to the virtual texture coordinate in the virtual texture page table; and
loading the obtained physical texture to the texture cache.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage media according to claim 15, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
performing, through the vertex shader, scaling transformation processing on a vertex coordinate of each rendering child tile in the virtual texture tile according to a scaling transformation matrix to obtain a local virtual texture coordinate of each rendering child tile after scaling transformation;
determining a starting physical texture coordinate corresponding to the physical texture according to a world coordinate corresponding to the virtual texture tile and a virtual texture coordinate corresponding to the virtual texture tile in a virtual texture page table; and
determining the physical texture coordinate corresponding to each rendering child tile in the texture cache according to the local virtual texture coordinate of each rendering child tile and the starting physical texture coordinate corresponding to the physical texture.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage media according to claim 15, wherein the determining, through the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, a physical texture coordinate corresponding to each rendering child tile in the texture cache comprises:
determining, through a sampling node in the vertex shader for each rendering child tile in the virtual texture tile corresponding to the vertex coordinate, the physical texture coordinate corresponding to each rendering child tile in the texture cache; and
the transmitting the physical texture coordinate to a pixel shader comprises:
transmitting, through the sampling node in the vertex shader, the physical texture coordinate to the pixel shader.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage media according to claim 15, wherein the method further comprises:
determining, through the vertex shader, a texture request parameter corresponding to each virtual texture tile according to a virtual texture coordinate corresponding to each virtual texture tile; and
transmitting, through the vertex shader, the physical texture coordinate and the texture request parameter to the pixel shader, wherein
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache based on the texture request parameter.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage media according to claim 15, wherein the determining a vertex coordinate of a virtual texture tile corresponding to an image in a virtual texture comprises:
determining, when the image comprises a terrain scene region, a vertex coordinate of a virtual texture tile corresponding to the terrain scene region in the virtual texture; and
the sampling, through the pixel shader, a texel matched with the physical texture coordinate from the physical texture in the texture cache and rendering, based on the texel, the image comprises:
sampling, through the pixel shader, the texel matched with the physical texture coordinate from the physical texture in the texture cache, and rendering, based on the texel, the terrain scene region in the image.
