The Daily Click ::. Forums ::. Klik Coding Help ::. String Object and Anti-aliasing
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
29th September, 2014 at 29/09/2014 13:11:56 -

Is it possible to disable anti-aliasing through any sort of method when using the String Object?

I figured out that it can be achieved by applying the monochrome effect to the string, however this only works under the Standard display mode. It doesn't work under Direct3D9, which I'm using. Any ideas?

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
29th September, 2014 at 29/09/2014 15:18:09 -

If you get really desperate, you could always use a shader to round the alpha value up or down...


FX file:

sampler2D img;
float4 fillColor;
float4 ps_main(in float2 texCoord : TEXCOORD0) : COLOR0 {
float4 myColor = tex2D( img, texCoord );
return float4( fillColor.r, fillColor.g, fillColor.b, round(myColor.a));
}
technique tech_main { pass P0 { PixelShader = compile ps_2_0 ps_main();}}


XML file:

<effect>
<name>RoundAlpha</name>
<description>Rounds pixel alpha to 0 or 1, and fills with a single color.</description>
<parameter>
<name>Fill color</name>
<code>fillColor</code>
<description>The color to fill.</description>
<type>int_float4</type>
<property>color</property>
</parameter>
</effect>

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
9th October, 2014 at 09/10/2014 10:06:22 -

Thanks Sketchy, that actually sounds incredibly intimidating. I really need to be more ambitious MMF2. ^____^;

 
Image

Tell 'em Babs is 'ere...

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
10th October, 2014 at 10/10/2014 14:38:58 -

Pixel shaders are honestly a lot simpler than they look - or at least, you don't really need to fully understand the complicated bits to be able to write useful shaders.
See my recently tidied-up article: http://www.create-games.com/article.asp?id=2275

Download links for the above shader files, ready to just copy & paste into the effects folder:
http://1drv.ms/1vWMHk9

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
15th October, 2014 at 15/10/2014 12:35:21 -

That's great Sketchy, thanks!

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click