GPU Shadow Generation via Dynamic PCF Kernel Scaling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional techniques for generating soft shadows from area light sources in computer graphics are either computationally expensive or fail to accurately depict penumbras, limiting their use in real-time applications.
Innovation Solution
The method involves scaling the percentage closer filtering kernel size based on the calculated width of the penumbra using shadow mapping and percentage closer filtering techniques, allowing for efficient generation of perceptually accurate soft shadows without requiring additional pre or post-processing steps.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional ray tracing techniques are used to determine all light rays from an area light source, then accurate soft shadow generation is achieved, but computational cost becomes excessively high
Solution Approach 1:
The patent segments the shadow generation process into two distinct phases: (1) pre-computation of depth values and penumbra widths for all pixels in image space, and (2) runtime shadow sampling using pre-computed percentage-closer filtering. This segmentation allows accurate soft shadow calculations to be performed once offline, while runtime rendering uses efficient pre-computed data, resolving the contradiction between accuracy and computational cost.
Solution Approach 2:
The patent performs preliminary action by pre-computing depth values, determining blocker depths, calculating penumbra widths, and generating percentage-closer filtering kernels for all pixels before runtime rendering. This pre-computation stores accurate shadow information in texture memory, enabling fast runtime shadow generation without repeating expensive calculations, thus achieving both accuracy and efficiency.
2Productivity
If hard shadows are used for every shadow generation, then computational efficiency is improved, but accuracy of penumbra depiction is lost
Solution Approach 1:
The patent applies local quality by using different shadow representation methods in different regions of the shadow map. For pixels in the umbra region (fully shadowed), hard shadow values are used. For pixels in the penumbra region (partially shadowed), soft shadow values with calculated penumbra widths are used. This local differentiation maintains accuracy where needed while preserving efficiency elsewhere.
Solution Approach 2:
The patent changes the parameter of shadow softness dynamically based on the calculated penumbra width for each pixel. The percentage-closer filtering kernel size is adjusted according to the penumbra width, which varies spatially across the shadow map. This parameter change enables accurate soft shadows in penumbra regions while maintaining hard shadows in umbra regions, balancing accuracy and efficiency.
3Ease of operation
If uniform penumbras are applied to all shadows, then visual appeal is improved, but ability to indicate object contact is lost
Solution Approach 1:
The patent makes the penumbra width dynamic rather than uniform. The percentage-closer filtering kernel size is calculated dynamically for each pixel based on the specific geometric relationship between the light source, blocker, and receiver at that location. This dynamic adjustment allows the shadow to adapt its softness locally, providing both visual quality and accurate contact indication.
Solution Approach 2:
The patent applies different penumbra characteristics to different spatial locations based on local geometric conditions. Where objects are close to contact, the calculated penumbra width becomes very small or zero, producing hard shadows that indicate contact. Where objects are separated, larger penumbra widths produce softer shadows. This local quality differentiation simultaneously achieves visual appeal and contact detection accuracy.
Data Source
AI summary
A method and system for generating shadows for a graphics processing unit. Specifically, the method determines whether a potential blocker occludes light from reaching a point of a scene in an image space. The light is generated from a light source. A width of a corresponding penumbra is determined for the point. The width is based on a width of the light source, a depth of the potential blocker from the light source, and a depth of a receiver from the light source. The receiver includes the point. A percentage closer filtering kernel size is scaled in proportion to the width of the corresponding penumbra. Thereafter, percentage closer filtering is performed for the point using the kernel size that is scaled in order to shade a pixel corresponding to the point.


