Graphics processing using directional representations of lighting at probe positions within a scene
Graphics processing systems can include lighting effects when rendering images. “Light probes” are directional representations of lighting at particular probe positions in the space of a scene which is being rendered. Light probes can be determined iteratively, which can allow them to be determined dynamically, in real-time over a sequence of frames. Once the light probes have been determined for a frame then the lighting at a pixel can be determined based on the lighting at the nearby light probe positions. Pixels can then be shaded based on the lighting determined for the pixel positions.
1. A machine-implemented method of graphics processing, comprising:
for each of a plurality of low-level probe positions within a scene, determining directional lighting representations at its position by incorporating data from one or more directional representations of lighting for first probe positions within the scene;
using the directional representations of lighting for the low-level probe positions to determine lighting indications for visible surfaces of the scene for pixels in a frame; and
shading the pixels in the frame in accordance with the determined lighting indications.
2. The machine-implemented method of claim 1 , wherein the first probe positions are high-level probe positions.
3. The machine-implemented method of claim 1 , wherein the first probe positions are global probe positions and the low-level probe positions are local probe positions.
4. The machine-implemented method of claim 1 , wherein the density of low-level probe positions is greater than the density of first probe positions within a local region of world-space.
5. The machine-implemented method of claim 1 , wherein said using the directional representations of lighting for the low-level probe positions to determine lighting indications for the visible surfaces of the scene for pixels in the frame comprises, for a particular pixel, interpolating in two dimensions between the directional representations of lighting for a set of low-level probe positions.
6. The machine-implemented method of claim 5 , further comprising selecting low-level probe positions for said interpolation based on a similarity between the low-level probe positions and the visible surface at the particular pixel in terms of the world-space position and/or depth from the viewpoint for the frame.
7. The machine-implemented method of claim 6 , wherein the similarity is used as a weighting factor in said interpolation.
8. The machine-implemented method of claim 1 , wherein the directional representations of lighting are defined in terms of spherical harmonic components.
9. The machine-implemented method of claim 1 , wherein a directional representation of lighting at a low-level probe position is determined based on a weighting of directional representations of lighting for one or more nearby first probe positions.
10. The machine-implemented method of claim 9 , wherein the one or more nearby first probe positions are those first probe positions within a distance threshold and which are visible from the low-level probe position.
11. The machine-implemented method of claim 10 , wherein ray tracing is used to determine which of the first probe positions are visible from the low-level probe position.
12. A graphics processing unit configured to render a sequence of frames, the graphics processing unit comprising:
processing logic configured to:
for each of a plurality of low-level probe positions within a scene, determine directional lighting representations at its position by incorporating data from one or more directional representations of lighting for first probe positions within the scene;
use the directional representations of lighting for the low-level probe positions to determine lighting indications for visible surfaces of the scene for pixels in a frame; and
shade the pixels in the frame in accordance with the determined lighting indications.
13. The graphics processing unit of claim 12 , wherein the first probe positions are high-level probe positions.
14. The graphics processing unit of claim 12 , wherein the first probe positions are global probe positions and the low-level probe positions are local probe positions.
15. The graphics processing unit of claim 12 , wherein the density of low-level probe positions is greater than the density of first probe positions within a local region of world-space.
16. The graphics processing unit of claim 12 , wherein the processing logic is configured to use the directional representations of lighting for the low-level probe positions to determine lighting indications for the visible surfaces of the scene for pixels in the frame by, for a particular pixel, interpolating in two dimensions between the directional representations of lighting for a set of low-level probe positions.
17. The graphics processing unit of claim 16 , wherein the processing logic is configured to select low-level probe positions for said interpolation based on a similarity between the low-level probe positions and the visible surface at the particular pixel in terms of the world-space position and/or depth from the viewpoint for the frame.
18. The graphics processing unit of claim 12 , wherein the processing logic is configured to determine a directional representation of lighting at a low-level probe position is based on a weighting of directional representations of lighting for one or more nearby first probe positions.
19. The graphics processing unit of claim 18 , wherein the one or more nearby first probe positions are those first probe positions within a distance threshold and which are visible from the low-level probe position.
20. A non-transitory computer readable storage medium having stored thereon processor executable instructions that when executed cause at least one processor to:
for each of a plurality of low-level probe positions within a scene, determine directional lighting representations at its position by incorporating data from one or more directional representations of lighting for first probe positions within the scene;
use the directional representations of lighting for the low-level probe positions to determine lighting indications for visible surfaces of the scene for pixels in a frame; and
shade the pixels in the frame in accordance with the determined lighting indications.