problem with my text rendering

Started by
8 comments, last by tonemgub 9 years, 6 months ago

Hey folks,

I have an issue with my text renderer and I'm trying to solve it for days now.

It's pretty hard to explain the problem. It's some kind of ghosting around my rendered text (text is rendered without aa).

But have a look for yourself.

[attachment=23918:app_text.jpg]

[attachment=23919:pix_text.jpg]

First one is an actual screenshot taken in the application (C++, Directx11, Windows), the second one is taken in pix.

As you can see pix can't output the ghosting in their debug rendering and shows the output i was expecting to see.

These are the things I already checked and shouldn't cause the issue.

- sampler is a point sampler

- no alpha blending applied

- uv offsets and size of the rectangle should be fine.

- font atlas looks alright (created with freetype, rendererd in monochrome = no anti aliasing)

If my explanations were to sparse just let me know.

Any ideas/suggestions are very welcome.

Advertisement

Is your framebuffer the same size as your window client area?

Looks like a fitlering problem, check the following:

1. pixel exact rendering

2. no linear filtering

3. no mipmapping (eg auto-generated rendering)

4. no compression

Read this: http://msdn.microsoft.com/en-us/library/windows/desktop/bb219690%28v=vs.85%29.aspx (It's about D3D9, but applies to d3D11 as well)

Also use integer coordinates for the text blits, being a fraction of a pixel out can produce the sort of effects you are seeing.

Is your framebuffer the same size as your window client area?

I had a similar problem with my font rendering, using OpenGL. The issue was glViewport not being the same size as the frame buffer. Is there an equivalent glViewport for D3D?

Hi.

Did pix bring up a dlg box saying something like turn aa off for pixel same as history or some thing

SO its turned off anti aliasing

hey guys thanks for your numerous responses.

Is your framebuffer the same size as your window client area?

My framebuffer and my client area are at the same size.

Looks like a fitlering problem, check the following:

1. pixel exact rendering

2. no linear filtering

3. no mipmapping (eg auto-generated rendering)

4. no compression

1. I adjusted the positions of my quads to fit pixel size but the result looks the same

2. my filter is a point filter with clamping

3. my texture has no mip mapping

4. the application copies the output of freetype's software renderer directly to d3d SRV, so no compression at all

Hi.

Did pix bring up a dlg box saying something like turn aa off for pixel same as history or some thing

SO its turned off anti aliasing

No, pix didn't bring up any dialog boxes or output log.

btw. I found an article by Adam Sawicki that says the half pixel offset error is gone in DirectX11 http://asawicki.info/news_1516_half-pixel_offset_in_directx_11.html

I found the error! It was indeed the size of my client area.

CreateWindow had an additional flag set and therefore the size AdjustWindowRect had calculated was wrong. Thank you so much guys.


btw. I found an article by Adam Sawicki that says the half pixel offset error is gone in DirectX11 http://asawicki.info/news_1516_half-pixel_offset_in_directx_11.html

I think you're right... I can't even remember if I noticed it in DX11 or DX9 smile.png . I guess I haven't tried to do 2D graphics in DX11 yet, so I just assumed that problem is still there. Besides, the half-pixel problem should've shown up in Pix as well. (D'oh!) Thanks for the link.

This topic is closed to new replies.

Advertisement