Jump to content
  • Advertisement
Sign in to follow this  
the_prodigy

problem with my text rendering

This topic is 1417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Edited by the_prodigy

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by tonemgub

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!