# vember

Member

65

122 Neutral

• Rank
Member
1. ## large water surfaces - application done

Nice demo! :)
2. ## Multiple screenspace distortion effects

yes, that's about it.. The way to do this would be to have two textures (A & B) that you flip between everytime you do a screen-space distortion effect. so you'd go like this: 1) scene -> A 2) A -> B 3) scene -> B 4) B -> A 5) scene -> A This way you can have an arbitary number of distortions and it'll always work. Combine this with a system that figures out which distortions overlap and which can be done in the same flip and it's all good.. ^^
3. ## High-Quality Interpolation & Optimized Software Alpha Blending

sinc-interpolation is ideal when seen from a frequency-domain point of view, but quite bad when seen from a spatial pov. In audio, sinc interpolation is great, but it's not good for image operations since our eyes are more sensitive to spatial details than the frequency domain. The bottom line is, the maths look great but you get halos. I'd go with bi-cubic since it's a good compromise. I wouldn't put to much value in that test, since you should never do 36 resampling operations in a row anyway (which accentuates the bad points about the non-sinc algorithms). You should always operate from the original picture. However, if image quality is important to you, DO the math in linear color space and not gamma space (the usual). assuming you have your color values as floats in the 0 - 1 range and have images with a gamma value of 2.2 (windows standard) you can use the following conversions: gamma->linear: y = powf(x,2.2); linear->gamma: y = powf(x,1/2.2);
4. ## "Ocean Ripple" filter?

what you need to do is a dependent texture read where the texture coordinates are offset by another texture read (which should probably be some low-freq noisy texture) well, some pixelshader pseudocode is probably easier to understand: scale - scale of the effect tc.xy - texture coordinates along the quad covering the viewport [0..1] tc_offset = tex2D(noisytexture, tc.xy); out.rgb = tex2D(image, tc.xy + scale*tc_offset.xy); That should give you the idea.