* The shader is very useful for expanding the 16-235 TV range to 0-255 PC range. * and so some details in the shadows or highlights can be lost. * This increases contrast, but clips any colors outside the new range to either black or white * Allows you to set a new black and a white level. * updated to 1.3+ by Kirill Yarovoy ~ v00d00m4n * by Christian Cann Schuldt Jensen ~ CeeJay.dk Save as: Levels.fx (you can safely replace old one with this updated version) Please keep comments, where I explain problem, In shader, i need to rise awareness of tonemap problem in modern games from lazy devs.this shader pack it just a temporary solution to improper white and black points and I hope that more people would notice problem and would force devs to fix it natively There is only one UI value, that for some reason gives me error during compilation, texture2d don't like int iResolution for some reason but #define works fine My problem - these formulas and I don't remember much of hlsl syntax and don't know reshade syntax specifics to implement it properly.Īlso, would be nice if someone could explain me how can I draw graph (y as output, x as input colors, on half transparent BG just like in histogram shader) on screen to visualize line and curve I'm actually getting for better debugging ?Īs for histogram - it works like charm, should be loaded after levels to let you see color distribution. I see it as 2nd step after linear function (to keep in corrections intact), with 2 if else functions where range 5-250 should be kept as is, and ranges -18-5 and 250-278 (again these are not constants, keep that in mind!) should be processed by two opposite curve formulas what will smoothly pack these ranges to output range. Since these points 5 and 250 should be edited in real time for each channel and end points 0 and 255 non constant and chould change with Ouput Level values, formula should be dynamic. So lets say I have 16-235 expanded to 0-255, since I its linear function, ill have values 0-16 appear expanded to -18-0 and values 235-255 expanded as 255-278, what I want, is set break point like 5 for black and 250 for white, and while everything in-between should be kep linear, since these points all values from 5 to -18 for black point should be smoothly curved into 5-0 range, and for white point values 250-278 should be smoothly curved to 250-255 range. ![]() ![]() ![]() Now you have both input and output levels, gamma, everything separate for each color channel, plus some anti-clipping measure (but not so good, I forgot most of curve related math and hope someone could help me to s-curve into 0-255 range everything that gets beyond it and clipped, by using confirurable curve start start and end points. Tired to wait for when Marty will release Lightroom shader, so i used old sweetFX levels and upgraded it and found old forgotten histogram shader and ported it to reshade 3 to achieve my goals and fully imitate Photoshop, Gimp and kind of levels editing. Extended Levels (W\B point ) + Histogram port
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |