Prod80's shader library
- prod80
- Topic Author
-- Some minor OCD code changes in Magical Rectangle
-- Sharpening now uses screen blend mode (more subtle with highlights)
-- Film Grain now has option to apply the grain only against the luminosity of the pixel, keeping hue and saturation intact. Additionally can adjust for perceived luminosity (green noise is otherwise very visible)
Example image about new noise coloring method
All available on GitHub
Enjoy!
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
Film Grain
• Improved the new color noise by using a different blend mode with background
• Improved the way noise is applied in highlights by slowly shifting to negative values
Shadow Midtone Highlights / Color Gradients / Magical Rectangle / Sharpening / Depth Slicer
• All have new and vastly improved blend modes for Saturation, Color, Hue, and Luminosity
Please Log in or Create an account to join the conversation.
- nikobellic
Now, I have been searching forums and almost everywhere for a nice VHS shader like this one
I have found a few retro style VHS shaders but not anything like this. The fact that I haven't found none as close as the video, it might be either super hard or I haven't looked hard enough. I also got a premier pro video tutorial but I have no knowledge on how to convert those filters to reshade shaders.
I hope you take a look it this, possibly have it in your to do list. Have a great day!
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
Levels,
Curved Levels,
Brightness Contrast Saturation,
Chromatic Aberration,
Sharpening (Unsharp Mask),
Film Grain,
Should be able to allow you to recreate that effect as shown in the video.
I like the channel blur though, so I may create and include that separately into my repository.
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
So this Film Grain now features
• Moving or still grain based on Simplex noise algorithm
• Configurable grain size ( 1 - 4 pixels )
• Grain smoothness NEW
• Grain color: random color / original background color NEW
• Grain amount ( controls the swing between -1 and +1 grain addition to the image )
• Grain color amount ( saturation control, only works on random color )
• Grain intensity ( controls the final mix between grain and no grain )
• Grain density ( controls the density of grain )
• Grain intensity highlights / lowlights ( controls the amount of grain added in highlights and lowlights )
• Grain depth controls ( allows you to apply different levels of grain in background and foreground )
Exaggerated example of S m o o t h G r a i n
Gradient example, smooth on the bottom
Please Log in or Create an account to join the conversation.
- Marty
prod80 wrote: Added option in Film Grain shader to apply a Gaussian Blur on the grain texture..
• Grain smoothness NEW
Nice. Certainly helps with the roughness a bit.
However I just wanted to report that in DX9 games I'm getting this error on compilation.
PD80_06_Film_Grain.fx(381,18-64): error X3526: can't use gradient instructions in loops with break
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
Marty wrote:
prod80 wrote: Added option in Film Grain shader to apply a Gaussian Blur on the grain texture..
• Grain smoothness NEW
Nice. Certainly helps with the roughness a bit.
However I just wanted to report that in DX9 games I'm getting this error on compilation.DX11 works fine, haven't tested DX12 yet.PD80_06_Film_Grain.fx(381,18-64): error X3526: can't use gradient instructions in loops with break
Ah yes, forgot about that lovely thing in DX9.
I uploaded a new version just now, that has a preprocessor definition to enable/disable the smoothing (no need to waste fps when someone doesn't like it). Can you check if that one still does it?
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
prod80 wrote:
Marty wrote:
prod80 wrote: Added option in Film Grain shader to apply a Gaussian Blur on the grain texture..
• Grain smoothness NEW
Nice. Certainly helps with the roughness a bit.
However I just wanted to report that in DX9 games I'm getting this error on compilation.DX11 works fine, haven't tested DX12 yet.PD80_06_Film_Grain.fx(381,18-64): error X3526: can't use gradient instructions in loops with break
Ah yes, forgot about that lovely thing in DX9.
I uploaded a new version just now, that has a preprocessor definition to enable/disable the smoothing (no need to waste fps when someone doesn't like it). Can you check if that one still does it?
Updated now again, should resolve it in DX9. Please try.
Please Log in or Create an account to join the conversation.
- Marty
prod80 wrote: Updated now again, should resolve it in DX9. Please try.
Yes, seems to be working now, even with smoothing on. Thanks for quick fix.
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
Correct Color & Correct Contrast
- Made the code more robust to avoid some rare issues
- Added improved method for tint detection using auto-tone to take better care with 'pure' colors besides only looking at max intensity
- Added improved fade function to avoid flickering and added slider to configure the speed in UI
- Improved the created textures to ignore screen size and AR and create 32x32 textures regardless, helps some oddities out of the way when changing resolutions on the fly (SRWE or else)
- Changed a some comparison math to max() / min() for neatness
- Improved method of color correction
Game image
Corrected for color and adjusted contrasts/brightness afterwards
Posterize / Pixelate
- Updated code, no performance cost on the pixelate now
Film Grain
- Did various updates to improve the visual aspects of the grain
Various shaders: Bloom, Sharpening, Chromatic Aberration, Film Grain
- Fixed compatibility with DX9 when using gradient function within a loop (forgot DX9 can't handle that)
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
PD80_02_Bloom.fx
Added new anti banding/dithering which is a lot faster and a whole lot cheaper. At this point requires an additional texture so take care when updating that you add the gaussian noise texture.
Banding in the blur (common issue due to precision)
New dithering (always on, no settings in UI)
Please Log in or Create an account to join the conversation.
- gamehancer
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
gamehancer wrote: hi please help me I would like to deactivate IN THE SHADER PD80_06_Chromatic_Aberration the rgb channel of chromatic aberration just keep the effect sharp which line deactivate please ?
Sorry but what do you mean, I don't understand? Chromatic Aberration will always have a slight blurring effect because it moves the colors around. If you look for Sharpening, why not use PD80_05_Sharpening.fx
Please Log in or Create an account to join the conversation.
- klotim
I have a RTX 2080 Ti.
Game resolution is 1440p
The quality is set to 2 and CA is enabled for the bloom shader.
Deband is disabled.
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
klotim wrote: is it possible to further improve performance for the bloom shader? On black mesa ( source engine ) it uses 20% according to statistics from the reshade gui.
I have a RTX 2080 Ti.
Game resolution is 1440p
The quality is set to 2 and CA is enabled for the bloom shader.
Deband is disabled.
Hi klotim,
While I know the bloom shader isn’t particularly light, it’s also not extremely heavy. You would notice it on a 2080Ti as performance is about 1.6ms (have 2080S myself) but shouldn’t push FPS down to unplayable. I can try and shave off a little more, but doing more than that will degrade quality visually, which I’m not that willing to compromise on. Also the UI indication is not a great guideline to see which shader impacts the performance the most. Best to check FPS with/without shaders on. Other effects like MXAO have a much greater impact on performance.
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
Added new version, now has super high performance mode. This is now Quality = 2 and runs the shader at 0.6ms at 1/16th screen size. The old mode 2 is now quality 1 (1/4th screen size), and quality 0 is full screen (slow but accounts for each individual pixel).
Enjoy
On github.
Please Log in or Create an account to join the conversation.
- gamehancer
the idea would be to remove only the chromatic aberration side and keep the sharp effect of the image > two link
shutterpulse.com/hdr-photoshop-actions/
https://www.facebook.com/photo.php?fbid=185569756229925&set=a.104522227668012&type=3&theater
Please Log in or Create an account to join the conversation.
- gamehancer
Please Log in or Create an account to join the conversation.
- prod80
- Topic Author
I know what you mean with using CA filter for sharpening... but that is not going to work.
Example:
And with heavy CA applied in a very small radius
But if you take out the CA, you end with the image without it.
The effect is just looking like that because you massively enhance the edges, but it's not actually useful.
Have a look at my sharpening shader. It does an Unsharp Mask and uses a Luminosity blend mode.
If you apply that heavily, you can get a better effect, likely. Please see example: imgsli.com/MTMzMzQ
Please Log in or Create an account to join the conversation.
- gamehancer
Please Log in or Create an account to join the conversation.