surface buffer cardinality and outputs

Bill Spitzak spitzak at gmail.com
Mon Mar 25 11:27:51 PDT 2013


Jerome Glisse wrote:

>> The object that displays the window buffer could be a curved surface.
>> Imagine HUDs with a curved glass (in that case the effect is permanent
>> and no client should do sub pixel rendering)
>>
>> Or consider fragment shaders applied to the window buffer. One cannot
>> apply fragement shader based effects without causing further glitches
>> when the most recent buffer relied on sub pixel layout.
>>
>> regards
>> Andreas
> 
> For this crazy case just don't send the matrix to the client and you
> done back to non sub-pixel perfect rendering.

It is somewhat possible to transform subpixel-rendered images. For 
normal RGB order the R samples are centered 1/3 of a pixel to the left 
and the B samples are centered 1/3 of a pixel to the right.

To apply an arbitrary transform you transform the channels 
independently. For the red, first translate 1/3 to the left, then the 
arbitrary transform, then translate 1/3 pixel to the right (all three 
must be multiplied together into a single sampling function).

Attached is a rotation of 90 degrees of a subpixel rendered image using 
this. The left example just rotates the image, the right example does 
the channels separately as described above. Bilinear filtering is used.

Certainly far from perfect but it may work for the curved examples where 
the transformation is close to the identity for some areas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.png
Type: image/png
Size: 36777 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130325/b4dc54d6/attachment-0001.png>


More information about the wayland-devel mailing list