Friday, 18 November 2011

Vignetting

Vignetting is a pretty strange effect - it is about image being darker in the corners than it is in the middle. In photography it is considered undesirable feature of the lens (or simply defect ;) ) as it significantly reduces image quality. Cheaper lenses have higher vignetting, whilst more expensive ones have very limited one (or almost none). However, in the last few years black & white and vintage like post processing became very popular amongst photographers. As strong vignette is also considered vintage (because almost no of the current lenses have it at such extremes) it is present in many modern photos (quite a paradox, don't you think). So I decided to implement it for nGENE. Actually "implement" is a bit too big word here as it is done using following few lines of shader code:

float vignetteStrength = 0.3f;
float4 scene = tex2D(sceneTex, IN.texCoord);
float4 colour = lerp(scene, vignetteColor, vignetteStrength * length(0.5f - IN.texCoord));

It couldn't be simpler I guess :) Although it isn't perfect it works very nice and it works in the very same way I apply it to my photos.

BTW I uploaded new screenshot from nGENE to Warsztat.gd:


0 comments:

Post a Comment