Skip to content

Commit

Permalink
chore: Fix Technicolor shader
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcarnie committed Mar 12, 2022
1 parent 8c29880 commit e4cee8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changes
- Technicolor: Fix malformed configuration
- Technicolor: Fix noise1 function clash

## [v1.3.0]
### Added
- Added FidelityFX Super Res
Expand Down
8 changes: 4 additions & 4 deletions shaders/Technicolor/shaders/film_noise.slang
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ layout(location = 4) in float hash_num2;
layout(location = 5) in float hash_num3;
layout(location = 6) in float frame_hash;
layout(location = 0) out vec4 FragColor;
layout(set = 0, binding = 2) uniform sampler2D Source;
layout(set = 0, binding = 3) uniform sampler2D noise1;
layout(set = 0, binding = 1) uniform sampler2D Source;
layout(set = 0, binding = 2) uniform sampler2D Noise1;

//https://www.shadertoy.com/view/4sXSWs strength= 16.0
float filmGrain(vec2 uv, float strength, float timer ){
Expand All @@ -109,8 +109,8 @@ void main()
float vig = smoothstep(0.0, 1.0 - params.vig_amt, len);

// create the noise/scratching effects from a LUT of actual film noise
vec4 film_noise1 = texture(noise1, noiseCoord.xx + (hash_num1 + hash_num3 - 0.85));
vec4 film_noise2 = texture(noise1, noiseCoord.xy + (hash_num1 + hash_num2 - 0.85));
vec4 film_noise1 = texture(Noise1, noiseCoord.xx + (hash_num1 + hash_num3 - 0.85));
vec4 film_noise2 = texture(Noise1, noiseCoord.xy + (hash_num1 + hash_num2 - 0.85));

// set up color channel offsets / deconvergence
vec2 red_coord = (centerCoord + 0.01 * vec2(x_off_r, y_off_r)) + 0.5;
Expand Down
6 changes: 3 additions & 3 deletions shaders/Technicolor/technicolor.slangp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ shaders = 2
shader0 = reshade/shaders/LUT/LUT.slang
shader1 = shaders/film_noise.slang

textures = "SamplerLUT;noise1;
textures = "SamplerLUT;Noise1"

SamplerLUT = reshade/shaders/LUT/cmyk-16.png
noise1 = resources/film_noise1.png
Noise1 = resources/film_noise1.png
SamplerLUT_linear = true
noise1_linear = true
Noise1_linear = true

0 comments on commit e4cee8b

Please sign in to comment.