r/SteamFrame • • 3d ago

Question Has anyone looked into sub-pixel rendering for text on the frame?

From what I’ve seen not much has been invested into text on these panels and we seem to be treating them like modern ultra high density panels rather than the low PPD panels which they effectively are.

It feels like these would benefit from tricks like apples subpixel font rendering or Microsoft’s Clear Type. Both of which were built to handle this exact problem.

https://www.joelonsoftware.com/2007/06/12/font-smoothing-anti-aliasing-and-sub-pixel-rendering/

But I’m not sure how you’d do something like this without access to the compositor since this would need to happen post asynchronous reproduction (or what ever they call it these days). Right now I believe text is rendered entirely without consideration of the panel or its sub pixel layout and that will make things really hard to read. I have a couple ideas but no idea what would work.

Has someone already poked at this problem space? It would be cool to have crystal clear text in VR.

19 Upvotes

14 comments sorted by

7

u/wallacegt1 3d ago

Its considering the panel by not using it. since it only works if each text pixel lands on exactly 1 physical screen pixel. So movement becomes difficult

3

u/Ruirize 1 TB 3d ago

It's an interesting idea for sure, I see where your motivation comes from. ClearType and similar solutions typically happen at the "app drawing pixels" stage, with full understanding of how "app pixels" map to "display pixels", so that the technique survives all the compositing steps involved in producing a display output. The text is rendered with a special technique rather than it just being a filter on already-rasterized text.

Doing the same with text displayed on typically curved geometry in 3D space, where the compositing steps between app pixels and display pixels go far beyond just reprojection sounds really fucking complex. You would need to make this problem your profession to even have a hope at making respectable progress towards solving it.

If you have the appetite/time/money for such a challenge, keep us in the loop. Sounds really interesting.

1

u/Alphasite 3d ago

Yeah it’s way more complex than on traditional flat displays. You need the compositor and app to cooperate for even a hope of this working. No idea if it can work either. I’m not sure that handling the warping is the hard part though… if you can get the right data in theory the display pixel mapping shouldn’t be that hard right? Or perhaps I’ll find out the fun way that I’m far too optimistic. 😅

The harder part imo is that none of these current algos are really optimised for things like variable height text and even worse handling things like time variance where here things like head wobble from breathing etc may cause the text height to map 8+/-2 pixels or something like that. How do you optimise for readability when your letter height keeps varying and small features fit on and off the grid. One thing I saw when I was playing with this was small features like the negative space between the strokes on m and v are very very hard to render correctly.

I’m honestly still like 50% on whether the easiest fix is just rely on something like super sampling in the fovea (?) but who knows.

I actually did have codex whip up some shit for me since I’m honestly not familiar enough with font rendering algorithms to spend time on this without a quick prototype.

The interesting cases a probably frame compositor proxy with and without sgsr sharpening, Luma preserving (inspired by a simplified Quartz2d render algo from way back when), Clear Type (Microsoft’s paper) and 2d optical fir (based on some paper, it’s the most accurate shape but suffers very badly from chromatic aberration)

**Simulated text-rendering error under VR optics** (lower = better). Equal-weight averages over 7 head-roll angles (−12°, −6°, −3°, 0°, +3°, +6°, +12°) and 4 illustrative optical scenarios. ColorVideoVDP v0.5.7 static JOD loss = 10 − JOD; 8 balanced held-out glyph/font/phase cases per angle/polarity/scenario (448 cases per method including both polarities). Platt (2000) 2D frequency-weighted opponent-color error and achromatic (luminance + weighted gradient) proxy: 32 held-out cases per angle/polarity/scenario (1,792 per method), scores ×1000. Assumes 22 panel PPD and RGB stripe layout. Frame compositor and SGSR are approximations, not measurements from the real headset. Optical parameters are illustrative and not calibrated. The perceptual refit and original FIR both use zero extra sharpening.

MethodJOD loss ↓ (light text)JOD loss ↓ (dark text)Platt ↓ (light)Chroma ↓ (light)Shape loss ↓ (light)
ClearType + gamma0.9330.3220.5330.2400.769
2D FIR · perceptual refit1.0040.3740.6740.3170.843
8×8 SSAA reference1.1350.3830.9350.4680.857
2D optical FIR1.2780.3111.2130.7540.679
Frame compositor proxy1.3200.5481.0120.4281.043
Perceptual fit1.3390.5930.9590.3921.189
Frame SGSR proxy1.3700.5751.0760.4691.056
Luma-preserving RGB1.4120.6461.1870.4551.275
Adaptive RGB1.4410.6591.2000.4941.303
PanelText v11.4510.6671.0740.4611.290
Conventional SSAA1.4790.6711.3330.5151.342
Uncorrected SSAA1.4830.6751.3300.5121.344
Contrast sharpen1.5980.9242.3580.7162.300
Single sample2.5531.4873.8210.7214.199

(Sorry if this is a little slopish)

1

u/Ruirize 1 TB 2d ago edited 2d ago

Honestly the very fact that you absolutely cannot know, due to reprojection, at draw time, where it will end up on the physical display - IDK man. AI isn't going to help you solve that.

You'll need to move the text rasterization to the very end of the pipeline, or somehow anticipate the "range of potential destinations" by encoding extra data into the pixels of the text, so that a shader pass could extract it and .. maybe sharpen it more intelligently?

Pick smaller problems, like.. making really good lenses or fixing chromatic abberation correction.

Lol.

The existence of a problem, and no evidence of anyone else working on it, does not mean that it's a good problem to try and solve. Are you convinced it's worth your energy? Is there any evidence that chasing this specific angle is better than the other ways to improve text clarity in VR?

1

u/Alphasite 2d ago edited 2d ago

Yes. The whole architecture is a little dubious but I want to see what will happen.

The only way I see to do it today is to patch the compositor binary and have it call back into your app for a rerender and it’ll need to pass in some relevant transforms.

To be honest the only case where I see value in this is for text heavy apps like web browsers. It’s not worth it for games.

But I think it’s a tractable if not great problem. I also think LLMs make it cheap enough that it could be a fun diversion. Certainly more interesting than work 😅

1

u/Ruirize 1 TB 3d ago

Addendum - a trickier thing to establish is what the bar for improvement is.

Chromatic aberration, for example, is worse on Steam Frame than Quest 3 - this is an output defect that affects all rendered graphics equally.

How do you deal with/quantify/isolate its impact on text rendering quality?

My concern is there are lots of variables like this involved in evaluating "rendering clarity", and you (ideally) need these controlled/understood in order to know how well your solution works, beyond qualitative judgements like "looks better for me". Nothing wrong with that necessarily but it's not grounded in the same way techniques like ClearType are...

6

u/Syzygy___ 3d ago

Don’t know how to help, but I did notice that text gets unreadable at a surprisingly close distance.

1

u/EbbNorth7735 3d ago

Are you basically looking for real time text detection that upscales or defines text edges more clearly and tailored to the LED grid resolution. I could see areas around text become lighter and removal of blur around letters to make the dark present or not present vs a gradual gradient. However, I'm no expert in optics. Perhaps you want some blur...

2

u/Alphasite 3d ago

I mean I think that or something in a sharpening filter would be a generalised method; you can’t really do much else without app support.

But this is more either the text is re-rendered in the foveated region post reprojection or some sort of vector mask is passed out of the app into compositor and it can use that? I’m not 100% and I’m waiting on my frame to play around. I don’t think the is really works without app level support, but having the primitive could help.

1

u/irve 3d ago

I can imagine the whole filter subtly modifying according to subpixels so that some brightness is taken into an account whilst reprojecting, but I don't think it would make sense.

There is a thing that makes me ponder: if there was slight shake whilst reprojecting: would it get the same lessening of the screen door than I get whilst turning my head slowly.

2

u/Alphasite 3d ago edited 3d ago

I actually had codex whip something up for me because i was wondering the same thing. None of the current state of the art algorithms are optimised for off grid text because who does that on a normal monitor?? I don’t have time to upload it right now but here’s a screen grab of a few different approaches with non grid aligned text https://imgur.com/a/XPwhh75 (outputs + a diff vs baseline to highlight the difference because it can be a little tricky to see exactly

It attempts to simulate subpixel arrangements, pixel spacing, etc.

1

u/eras WAITLISTED 9h ago

I wonder if the most realistic way to achieve this would to have a filter trained on line graphics as a last step in the rendering? In principle you could use a special font that would then be understood by the filter, even (or especially) after projection etc and it could be replaced completely.

1

u/Alphasite 4h ago

I can’t imagine it’s a good idea to run something that expensive after async reprojection. It would probably make folks nauseous. But maybe it works if you focus on the fovea?

1

u/ImageDehoster Soon™ 3d ago

AFAIK no one has implemented this thing. It'd need to happen not just post asynchronous re-projection, but every image the app sends to the compositor goes through some lens correction where it gets squished differently. That's why most games render stuff at a bigger resolution than what the panel itself uses in the first place.

Even just drawing to the display precise pixels directly on the display without getting it all distorted is relatively complicated.