View-invariant edge filtering for electronic devices
View-invariant edge filtering is provided. In one or more implementations, view-invariant edge filtering may provide anti-aliasing that is effective in reducing or eliminating perceivable aliasing across various different viewing configurations of display content, including foveated rendering configurations and/or viewing configurations in which display content is moveable and rotatable in three virtual dimensions.
1 . An electronic device, comprising:
a memory; and
one or more processors configured to:
obtain display content to be displayed by the electronic device for three-dimensional viewing in a first viewing configuration and a second viewing configuration that is different than the first viewing configuration, the display content including a display object having an edge, wherein the first and second viewing configurations include a foveated rendering of the display content and a viewing angle of a three-dimensional perspective view of the display object;
apply a view-invariant filtering operation to the edge of the display object; and
display, in at least one of the first or second viewing configurations, the display content with the view-invariant filtering operation applied.
2 . The electronic device of claim 1 , wherein the one or more processors are further configured to display, in at least the other of the first or second viewing configurations, the display content with the view-invariant filtering operation applied.
3 . The electronic device of claim 2 , wherein the first viewing configuration comprises the foveated rendering of the display content, the second viewing configuration comprises the three-dimensional perspective view of the display content, and wherein the one or more processors are further configured to display the display content with the view-invariant filtering operation applied in the at least one of the first or second viewing configurations by displaying the display content with the view-invariant filtering operation applied concurrently in both the first and second viewing configurations.
4 . The electronic device of claim 1 , wherein the view-invariant filtering operation is applied to generate feathered rendered pixel values within a fixed width margin in a rendered pixel value space.
5 . The electronic device of claim 4 , wherein the one or more processors are configured to display the display content with the view-invariant filtering operation applied in the at least one of the first and second viewing configurations by displaying each of the feathered rendered pixel values that are within the fixed width margin in the rendered pixel value space, using a first number of display pixels of a display of the electronic device, and by displaying at least one other rendered pixel value outside the fixed width margin in the rendered pixel value space with a second number of display pixels different from the first number of display pixels.
6 . The electronic device of claim 5 , wherein the second number of display pixels is one display pixel and the first number of display pixels is more than one display pixel.
7 . The electronic device of claim 4 , wherein the one or more processors are configured to apply the view-invariant filtering operation at least in part by determining alpha values of the feathered rendered pixel values using a predetermined filter function, and wherein, for each feathered rendered pixel value, the predetermined filter function is a function of a distance of the feathered rendered pixel value to the edge of the display object.
8 . The electronic device of claim 7 , wherein the one or more processors are configured to apply the view-invariant filtering operation by:
obtaining a distance, to the edge of the display object, of a location of a fragment of the display content in a display content space;
obtaining a derivative of the distance in the display content space with respect to the distance in the rendered pixel value space;
setting a filter width of the predetermined filter function in the display content space using the derivative and the fixed width margin in the rendered pixel value space; and
determining one of the alpha values of a respective one of the feathered rendered pixel values corresponding to the fragment of the display content, using the distance in the display content space as an input to the predetermined filter function with the filter width in the display content space.
9 . A non-transitory computer-readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to:
obtain display content to be displayed by a device for three-dimensional viewing in any of a plurality of viewing configurations, the display content including a display object having an edge, wherein the plurality of viewing configurations include a foveated rendering of the display content and a viewing angle of a three-dimensional perspective view of the display object;
apply, by the device, a filtering operation to the edge of the display object, the filtering operation having an invariance across the plurality of viewing configurations; and
display, by the device in at least one of the plurality of viewing configurations, the display content with the filtering operation applied.
10 . The non-transitory computer-readable medium of claim 9 , wherein the plurality of viewing configurations further include
a viewing distance of the display object.
11 . The non-transitory computer-readable medium of claim 9 , wherein the filtering operation is applied to generate rendered pixel values within a fixed width margin in a rendered pixel value space.
12 . The non-transitory computer-readable medium of claim 9 , wherein the filtering operation is based at least in part on a derivative of distance in a display content space of the display content with respect to a distance in a pixel space.
13 . A method, comprising:
obtaining display content to be displayed by a device for three-dimensional viewing in any of a plurality of viewing configurations, the display content including a display object having an edge, wherein the plurality of viewing configurations include a foveated rendering of the display content and a viewing angle of a three-dimensional perspective view of the display object;
applying, by the device, a view-invariant filtering operation to the edge of the display object; and
displaying, by the device in at least one of the plurality of viewing configurations, the display content with the view-invariant filtering operation applied.
14 . The method of claim 13 , wherein the plurality of viewing configurations further include
a viewing distance of the display object.
15 . The method of claim 13 , wherein the view-invariant filtering operation is applied to generate rendered pixel values within a fixed width margin in a rendered pixel value space.
16 . The method of claim 15 , wherein displaying the display content with the view-invariant filtering operation applied in the at least one of the plurality of viewing configurations comprises displaying the rendered pixel values that are within the fixed width margin in the rendered pixel value space, using a variable number of display pixels of a display of the device, the variable number of display pixels being based on the at least one of the plurality of viewing configurations.
17 . The method of claim 15 , wherein the applying the view-invariant filtering operation comprises determining alpha values for the rendered pixel values using a predetermined filter function.
18 . The method of claim 17 , wherein, for each rendered pixel value, the predetermined filter function is a function of a distance of the rendered pixel value to the edge of the display object.
19 . The method of claim 18 , wherein applying the view-invariant filtering operation comprises:
obtaining a distance, to the edge of the display object, of a location of a fragment of the display content in a display content space;
obtaining a derivative of the distance in the display content space with respect to the distance in the rendered pixel value space;
setting a filter width of the predetermined filter function in the display content space using the derivative and the fixed width margin in the rendered pixel value space; and
determining one of the alpha values of a respective one of the rendered pixel values corresponding to the fragment of the display content, using the distance in the display content space as an input to the predetermined filter function with the filter width in the display content space.
20 . The method of claim 19 , wherein obtaining the distance in the display content space comprises obtaining the distance using a signed distance field.
21 . The method of claim 19 , wherein obtaining the distance in the display content space comprises obtaining a previously stored attribute for the display object.