Antialiasing - Is it even possible?

rawbot69rawbot69 USMember

Hi everyone,

So I am creating a DrawNode and drawing a texture, setting it isAntialiased = true.
`
float size = radius * 2.0f;
CCPoint circleCenterPos = new CCPoint(radius, radius);
CCDrawNode draw = new CCDrawNode();

        draw.DrawSolidCircle(circleCenterPos, radius, borderColor);
        draw.DrawSolidCircle(circleCenterPos, radius - borderWidth, backgroundColor);

        // create render texture containing draw node
        CCRenderTexture rtm = new CCRenderTexture(
            new CCSize(size, size),
            new CCSize(size, size),
            CCSurfaceFormat.Color, CCDepthFormat.Depth24Stencil8
            );

        rtm.BeginWithClear(CCColor4B.Transparent);

        draw.Visit();

        rtm.End();
        rtm.Texture.IsAntialiased = true;

`

But my rendering looks exactly the same as if anti aliasing doesn't work.

Btw, I set these two to true as well in case you are wondering.

application.PreferMultiSampling = true; CCTexture2D.DefaultIsAntialiased = true;
How the heck do I make my textures render with antialiasing? Please help! I am running this on Windows.

Answers

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    @rawbot69

    The primitives themselves do not but you may be able to use this article as a guide. See the part on anti-aliasing which uses a form of alpha-blending and creating your own line drawing algorithms based on the information outlined.

Sign In or Register to comment.