Archived

This topic is now archived and is closed to further replies.

Leroy1891

Render to texture problem

Recommended Posts

Leroy1891    122
I have a texture class that can load an image and project it onto the screen in 2D and it can also prepare a blank texture to be rendered into. when i load an image into one texture and prepare another texture to be the same size I can render the contents of the first texture into the prepared one no problem. but when i try to draw the first texture and render that same area of screen into the same texture it slowly blurs. Any ideas?

Share this post


Link to post
Share on other sites
Krohm    5031
Maybe because it''s getting slightly minified/magnified and this means it goes filtering. I hardly see how this could cause a problem in a short period of time but maybe some drivers/hardware is likely to blur it a little.

However, this explains a single blur (per frame) not why multiple frame gets blurred.
Umh, I guess I have no real idea of what''s happening. More infos may be nice.

Share this post


Link to post
Share on other sites
Nik02    4348
The texel alignment brings a little error, because it is not exact. That accumulates to what you describe as "slow blurring".

Maybe your geometry or texture coords are 0.5 to 1 pixel off?
Also, what are you trying to do?

kind rgds,
-Nik

Share this post


Link to post
Share on other sites
Leroy1891    122
the settings for loading an image and preparing for rendering
are the same. what i want to do is draw a tex to a certain part
of the screen and render that exact same area into it so as to copy it. that way i can superimpose other graphics onto the texture.

The texture coords are the same every time the texture is rendered so i don''t think that''s it.

I''m not sure what was meant by texel alignment. could you please explain

Share this post


Link to post
Share on other sites
Nik02    4348
Texture sampling points are not necessary aligned exacly at the pixel border. The float to integer conversion introduces some error to the sampling process due to that fact.

Try moving the texcoords by some fraction, for example 0.5, at both u and v directions.

Note that I''m not an OpenGL expert, so I don''t know the exact recommendations for the offsets.

-Nik

Share this post


Link to post
Share on other sites