Skip to main content
GameDev.net gamedev.net
🔒 Locked

problem with my text rendering

Started by the_prodigy Sep 26, 2014 at 1:24 AM 8 replies 2.6k views
Original Post
the_prodigy
the_prodigy

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.

Chris_F
Chris_F

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

Ashaman73
Ashaman73

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

Stainless
Stainless

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

web383
web383

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?

ankhd
ankhd

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

the_prodigy
the_prodigy

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

the_prodigy
the_prodigy

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.

tonemgub
tonemgub

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.