Method and apparatus for generating a shadow effect using shadow volumes
AssigneeVIA Technologies, Inc.
InventorsJiangming Xu, Wen-Chung Chen, Yuanfeng Wang, Liang Li, John Brothers, Boris Prokopenko
Life of this patent
Estimating the term…
Abstract
The computer graphics system is configured to generate a shadow effect with a stencil shadow volume method using a combination of compressed and uncompressed stencil buffers in coordination with compressed and uncompressed depth data buffers. An uncompressed stencil buffer is capable of storing stencil shadow volume data for each pixel and a compressed stencil buffer is capable of storing stencil shadow volume data for a group of pixels.
Claims30
An apparatus for use in a computer graphics system, comprising:
- a plurality of depth buffers for storing depth data, wherein at least one of the plurality of depth buffers is configured to provide depth data for a group of pixels, wherein at least one other of the plurality of depth buffers is configured to provide depth data for each pixel of the group;
- a plurality of stencil buffers, the stencil buffers configured to store stencil shadow volume data, wherein at least one of the plurality of stencil buffers is configured to provide stencil shadow volume data for the group of pixels;
- wherein at least one other of the plurality of stencil buffers is configured to store stencil shadow volume data for each pixel of the group;
- and
- control logic for controlling the plurality of stencil buffers and the plurality of depth buffers, wherein the stencil shadow volume data is generated and stored.
A method for generating a shadow effect in a computer graphics system, comprising the steps of:
- rendering an object with diffuse color;
- generating pixel depth information for a scene for storage in a pixel depth buffer;
- generating depth information for a group of pixels, wherein the depth information for the group of pixels is stored in a compressed depth buffer;
- testing the depth information in the compressed depth buffer to determine if the group of pixels may utilize a shadow mask data in a compressed stencil buffer;
- generating the shadow mask data;
- wherein a first portion of the shadow mask data is generated in the compressed stencil buffer, wherein a second portion of the shadow mask data is generated in a pixel stencil buffer;
- generating a shadow area, wherein the shadow area is determined by the shadow mask data contained in the compressed stencil buffer and the pixel stencil buffer;
- and
- adding specular color to objects not in the shadow area.
A computer graphics system comprising:
- depth data compression logic configured to generate a compressed depth data, where the compressed depth data corresponds to a group of pixels;
- shadow data compression logic configured to generate a compressed stencil shadow data, where the compressed stencil shadow data corresponds to the group of pixels, wherein the compressed stencil shadow data is generated utilizing a stencil shadow volume method;
- shadow data generation loge configured to generate an uncompressed stencil shadow data, wherein the uncompressed stencil shadow data is generated utilizing the stencil shadow volume method;
- and
- shadow data merging logic configured to selectively merge the compressed stencil shadow data with the uncompressed stencil shadow volume data.
Dependencies are inferred from the claim text.