i copied a part of the PP1 contrast & saturation routine, but that has a nasty posterizing sideeffect cause it
luminates greytones so that black parts of the image get grey, i don't want that.
so i'm pretty sure the piece of code is not really the right way to regulate contrast.
i know how to insert code and make defines, but i don't know much about color processing yet.
can someone tell me what code regulates simple contrast ?
what i inserted was this;
Code: Select all
#ifdef PP3EXTRA
float cgray=dot(color.xyz, float3(0.27, 0.67, 0.06));
cgray=pow(cgray, EContrastV3);
float3 poweredcolor=pow(color.xyz, EColorSaturationV3);
float newgray=dot(poweredcolor.xyz, float3(0.27, 0.67, 0.06));
color.xyz=poweredcolor.xyz*cgray/(newgray+0.0001);
#endif
any help would be greatly appreciated.