Skip to content

Commit

Permalink
Add green shift
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jan 22, 2022
1 parent 8c389bc commit 30fd6fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shaders/cAbberation.fx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ uniform float2 _ShiftRed <
ui_type = "drag";
> = -1.0;

uniform float2 _ShiftGreen <
ui_type = "drag";
> = 0.0;

uniform float2 _ShiftBlue <
ui_type = "drag";
> = 1.0;
Expand Down Expand Up @@ -60,7 +64,7 @@ void AbberationPS(in float4 Position : SV_Position, in float2 TexCoord : TEXCOOR
// Shift red channel
OutputColor0.r = tex2D(_SampleColor, TexCoord + _ShiftRed * PixelSize).r;
// Keep green channel to the center
OutputColor0.g = tex2D(_SampleColor, TexCoord).g;
OutputColor0.g = tex2D(_SampleColor, TexCoord + _ShiftGreen * PixelSize).g;
// Shift blue channel
OutputColor0.b = tex2D(_SampleColor, TexCoord + _ShiftBlue * PixelSize).b;
// Write alpha value
Expand Down

0 comments on commit 30fd6fc

Please sign in to comment.