Jump to content

  • Log In with Google      Sign In   
  • Create Account


Texture flickering and missing pixels


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 treiguts   Members   -  Reputation: 681

Like
0Likes
Like

Posted 27 January 2013 - 04:04 PM

Hi! smile.png

 

Youtube video with my "game": 

 

I have missing pixel problem. At top left corner you can see few readings. My coordinates reading is missing some pixels from x coordinate (00:05 time in video). y coordinate is ok. That makes me believe, than my texture coordinates are calculated correctly. I'm not sure where should I start look for the root of problem. The same thing appears in FPS reading, P is missing pixels. But at the same time, CPU reading is ok.

 

Flickering - tiles/textures edge is flickering in white color. It is seen only when camera is moving. And again, I don't know where to look to fix it.

 

If my problems is uncommon, I supplied files as attachments. They are separated for each problem and redundant code removed.

 

Anyway, I hope for some suggestions smile.png

Attached Files



Sponsor:

#2 C0lumbo   Crossbones+   -  Reputation: 2162

Like
1Likes
Like

Posted 27 January 2013 - 04:21 PM

I think the area you need to be looking at is the mapping between the texels from your texture resources to the pixels of your frame buffer.

 

If you're trying to achieve a 1:1 mapping (aka pixel perfect rendering), then you might need to look to see if there's errors in your orthographic projection, or maybe play around with a sub-pixel offset when you render your quads. A common mistake is setting your window to, say, 1024x768 and setting up an ortho projection accordingly, but forgetting to account for the window border size - that would produce the kind of artifacts you're seeing.

 

If your images are intentionally scaled, then fixing the problem should be a simple case of enabling linear filtering on your texture sampler.



#3 treiguts   Members   -  Reputation: 681

Like
1Likes
Like

Posted 28 January 2013 - 07:03 AM

Indeed, adjusting proper window dimensions, fixed my missing pixel problem. Thanks C0lumbo. Flickering textures to be solved

 

Update:

Ahaa, I was able to solve flickering texture. Turns out, whenever I set camera coordinates according to character position, x and y coordinate were not rounded ( -10.5645;45.4545, for example ) and that resulted, I guess, in awkward camera placement or something. Anyway, coordinate rounding solved it. Thanks.


Edited by treiguts, 28 January 2013 - 07:46 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS