Re: driver level sub-pixel rendering?

2006-04-01 Thread Keith Packard
On Fri, 2006-03-31 at 09:33 -0700, Brian Paul wrote:

 AFAIK, nobody's hardware does that.
 
 When that kind of antialiasing is done for text, I think it's the job 
 of the font rendering code to do so.

It's not the construction of the glyphs that's at issue here, I don't
think. The glyphs are drawn to the screen using a separate alpha channel
for each component in the pixel, an operation which isn't directly
supported by the GL API at present. I don't know what we'd need in the
hardware for this to be efficient though; I believe it is possible to do
it today using three passes for each string, which seems horrendous
until you realize how slow it will be to do the same thing with the CPU.

-- 
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: driver level sub-pixel rendering?

2006-04-01 Thread David Reveman
On Sat, 2006-04-01 at 20:08 +0200, Nicolai Haehnle wrote:
 On Friday 31 March 2006 19:49, Keith Packard wrote:
  On Fri, 2006-03-31 at 09:33 -0700, Brian Paul wrote:
  
   AFAIK, nobody's hardware does that.
   
   When that kind of antialiasing is done for text, I think it's the job 
   of the font rendering code to do so.
  
  It's not the construction of the glyphs that's at issue here, I don't
  think. The glyphs are drawn to the screen using a separate alpha channel
  for each component in the pixel, an operation which isn't directly
  supported by the GL API at present. I don't know what we'd need in the
  hardware for this to be efficient though; I believe it is possible to do
  it today using three passes for each string, which seems horrendous
  until you realize how slow it will be to do the same thing with the CPU.
 
 Surely you could just use an RGB texture instead of an ALPHA texture? Then 
 it's just a matter of setting the appropriate texture environments and 
 blending modes.

Not really, as you can only pass one alpha value to the blending stage.
In the general case you need to do it in multiple passes. I've got code
in glitz for doing this in three passes. For the case when we're using a
solid source color and OVER operator (I think that's 99.9% of all text
rendering in X today) we can actually pass all alpha channels to the
blending stage and achieve per-component alpha blending with the solid
source color in one pass by using GL blend color. I've got code in glitz
for doing this as well.

-David



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: driver level sub-pixel rendering?

2006-03-31 Thread Brian Paul

John Kheit wrote:
Sorry Brian, I should have been more specific.  I mean more as a final 
output onto a screen.  Using an LCD/CRT's individual RGB subpixels to 
antialiasing (or some form of screen output enhancement). It seems a lot 
of the 3D stuff in the GPU is already employing sub-pixel coordinates, 
so it would be nice if the actual output to the screen would take 
advantage of that.


AFAIK, nobody's hardware does that.

When that kind of antialiasing is done for text, I think it's the job 
of the font rendering code to do so.


-Brian


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: driver level sub-pixel rendering?

2006-03-31 Thread jkheit
I think some of the cards use the GPUs for scaling video (and perhaps other optimizations). Kind of like the nice upscaling done by some DVD players.  Nvidia calls it PureVideo:http://www.nvidia.com/page/purevideo.html"And the high-precision subpixel processing enables videos to be scaled to any size, so that even small videos look like they were recorded in high-resolution."I'm sure ATI has something similar? I would guess that this kind of thing could also be used for other things sent to it?On Mar 31, 2006, at 11:33 AM, Brian Paul wrote:John Kheit wrote: Sorry Brian, I should have been more specific.  I mean more as a final output onto a screen.  Using an LCD/CRT's individual RGB subpixels to antialiasing (or some form of screen output enhancement). It seems a lot of the 3D stuff in the GPU is already employing sub-pixel coordinates, so it would be nice if the actual output to the screen would take advantage of that. AFAIK, nobody's hardware does that.When that kind of antialiasing is done for text, I think it's the job of the font rendering code to do so.-Brian  Best regards,John KheitE-mail: mailto:[EMAIL PROTECTED]AOL Instant Messenger: John Kheit 

Re: driver level sub-pixel rendering?

2006-03-31 Thread Philipp Klaus Krause
[EMAIL PROTECTED] wrote:

 
 And the high-precision subpixel processing enables videos to be scaled
 to any size, so that even small videos look like they were recorded in
 high-resolution.

Trilinear texture filtering should do that. It's supported on any
graphics card these days. It's more a matter of whether the video player
application uses it.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: driver level sub-pixel rendering?

2006-03-31 Thread Philip Armstrong
On Fri, Mar 31, 2006 at 01:51:03PM -0500, [EMAIL PROTECTED] wrote:
I think some of the cards use the GPUs for scaling video (and perhaps
other optimizations). Kind of like the nice upscaling done by some DVD
players.? Nvidia calls it PureVideo:
[1]http://www.nvidia.com/page/purevideo.html
And the high-precision subpixel processing enables videos to be scaled to
any size, so that even small videos look like they were recorded in
high-resolution.
I'm sure ATI has something similar? I would guess that this kind of thing
could also be used for other things sent to it?
On Mar 31, 2006, at 11:33 AM, Brian Paul wrote:
 
  John Kheit wrote:
 
Sorry Brian, I should have been more specific.? I mean more as a final
output onto a screen.? Using an LCD/CRT's individual RGB subpixels to
antialiasing (or some form of screen output enhancement). It seems a
lot of the 3D stuff in the GPU is already employing sub-pixel
coordinates, so it would be nice if the actual output to the screen
would take advantage of that.
 
  AFAIK, nobody's hardware does that.
  When that kind of antialiasing is done for text, I think it's the job of
  the font rendering code to do so.

Is the original author talking about Cleartype-style antialiasing? (ie
using the RGB subpixels to get more {usually horizontal} resolution in
text rendering).

Sounds like something you could do with a pixel shader perhaps.
Straight alpha-blending with the RENDER extension is already
accelerated on most hardware supported by DRI isn't it?

Phil

-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: driver level sub-pixel rendering?

2006-03-31 Thread jkheit
Yes. But not only for text, for video and just about anything blasted onto the screen.  I think the Nvidia stuff I put on might do that for everything that hits the LCD. Basically the hardware would give you a resolution boost for anything that can keep partial pixel measurements internally.Do any of the Linux drivers support this type of thing?Thanks.On Mar 31, 2006, at 3:48 PM, Philip Armstrong wrote:Is the original author talking about Cleartype-style antialiasing? (ieusing the RGB subpixels to get more {usually horizontal} resolution intext rendering).Sounds like something you could do with a pixel shader perhaps.Straight alpha-blending with the RENDER extension is alreadyaccelerated on most hardware supported by DRI isn't it?Phil-- http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642--___Dri-devel mailing listDri-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/dri-devel  Best regards,John KheitE-mail: mailto:[EMAIL PROTECTED]AOL Instant Messenger: John Kheit

Re: driver level sub-pixel rendering?

2006-03-30 Thread Brian Paul

John Kheit wrote:
Do these drivers do anything to support subpixel rendering of the text 
or screen images? Is any of that built in to the hardware acceleration, 
or is that done only at the operating system level?


I think on the Windows side, some of the Nvidia drivers do subpixel work 
on the driver level.


Can you be more specific?

If you're asking about line/triangle rasterization, I believe vertex 
coordinates are snapped/truncated to some sub-pixel fraction (rather 
than whole pixel coords) in all hardware.


For text, are you asking about some form of antialiasing?

Or, do you have multisampling in mind?

-Brian


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: driver level sub-pixel rendering?

2006-03-30 Thread John Kheit
Sorry Brian, I should have been more specific. I mean more as a final output onto a screen. Using an LCD/CRT's individual RGB subpixels to antialiasing (or some form of screen output enhancement). It seems a lot of the 3D stuff in the GPU is already employing sub-pixel coordinates, so it would be nice if the actual output to the screen would take advantage of that.
On 3/30/06, Brian Paul [EMAIL PROTECTED] wrote:
John Kheit wrote: Do these drivers do anything to support subpixel rendering of the text or screen images? Is any of that built in to the hardware acceleration, or is that done only at the operating system level?
 I think on the Windows side, some of the Nvidia drivers do subpixel work on the driver level.Can you be more specific?If you're asking about line/triangle rasterization, I believe vertex
coordinates are snapped/truncated to some sub-pixel fraction (ratherthan whole pixel coords) in all hardware.For text, are you asking about some form of antialiasing?Or, do you have multisampling in mind?
-Brian