Sign in to follow this  
bene81

Image Processing

Recommended Posts

bene81    138
hey everybody 2 (simple) questions for the advanced ogl programmer: If I have a rendering context I am bound to the pixelformat. So I give in Floating Point values the are clamped to 0.1 So If I give in bytes everythin is fine. But how does the gl handle these values internally ? If I put in 0xFE for flat shaded polygon, and I read out the back buffer. Is it assured that I get the same values back ???? Or are there some roundings ? 2. Has somebody a simple example source sniipped for doing offscreen image processing with shaders. I only need the projection modelview and the coordinates for the screen aligned quad. and the appropriate shader to make texels = pixels. Or does somebody know an integratation / summerize shader ? I mean you put in a texture and get at the end a texture with size 1 and the sum of all pixel values from the source target. thanks!!

Share this post


Link to post
Share on other sites
V-man    813
I'll only answer the first part:
For 0 and 255, you SHOULD get the same value back. Anything in between is not guarateed.
GPUs like Geforce 2 and 3 use to convert color values to 12 bit precision before interpolating. Nowadays, probably it's done with 32 bit precision on nVidia. ATI probably interpolated as 32 bit float as well.
I would never rely on a GPUs precision. They are for rendering.

Share this post


Link to post
Share on other sites
ma_hty    100
I implemented a shader program for dense matrix multiplication some years ago. It can speed up the calculation for about 20 times comparing with the CPU matrix multiplication. Therefore, I can tell you that it is feasible to do integratation using shader.

And, there are even more advanced research that using GPU to do matrix decomposition ( http://www.cs.unc.edu/~geom/Numeric/svd/ ). I remembered that they posted their paper together with the source code on their website. Try to search with google, maybe you can find it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this