PDA

View Full Version : Fading wraplist edges


djh_
2008-07-29, 06:07
You used to be able to do this with the old buttonscrollers. Any chances it could reappear for wraplists? I'm thinking textual wraplists mostly.

jmarshall
2008-07-29, 06:12
Nope - this is very tricky for text in particular as you're rendering separate quads for each letter (so you need separate pieces of the diffuse texture for each letter). I'll have to talk with our GL expert as to whether there's a cunning way to do this sort of thing.

The only way for now is poor-mans fading where you fade to a known background image by making a semi-transparent copy over the top of the text.

djh_
2008-07-29, 06:43
Can't argue with that. Cheers anyway.

Jezz_X
2008-07-29, 07:21
well I thought we discussed this earlier and figured the easiest way was to render the whoe thing behind the scenes to one texture before its displayed diffuse it then display it

Not saying its easy just saying we discussed it :)

jmarshall
2008-07-29, 07:55
Yeah, the problem even then is deciding where and how to place the diffuse texture. Text can be different lengths - should the diffuse be placed and stretched based on where the text is or where the underlying control is. Should it be stretched to fit the text or placed so that it's not stretched.

It could conceivably done while rendering the text (i.e. no need for separate render target) though the computations are higher.

We really need to get d4rk's thoughts on what method would be the best to employ.

Lastly, note that the button scroller only ever made the text as a whole transparent - it didn't selectively fade text out, so can be accomplished right now using conditionals on the listitem position. It won't quite be the same (as the text was faded according to where it was positioned, which meant different amounts as it moved) but it'll be close.

Cheers,
Jonathan

djh_
2008-07-29, 19:13
I'm firmly of the belief that the diffuse texture should apply to the entire control rather than the text, never to be resized. This, however, could just be a personal bias. I always thought the idea of diffuse was to simulate either light or shadow being cast across the control. In that situation, the position or size of its contents would be irrelevant.