Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #693 from Sonicadvance1/PP-shaders-improvement
Improved system for post processing shaders.
- Loading branch information
Showing
65 changed files
with
1,387 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,4 @@ | ||
| SAMPLER_BINDING(9) uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| uniform vec4 resolution; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw)) * 8.0; | ||
| SetOutput((SampleOffset(int2(1, 1)) - SampleOffset(int2(-1, -1))) * 8.0); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| SAMPLER_BINDING(9) uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| uniform vec4 resolution; | ||
|
|
||
| void main() | ||
| { | ||
| vec4 a = texture(samp9, uv0+resolution.zw); | ||
| vec4 b = texture(samp9, uv0-resolution.zw); | ||
| ocol0 = ( a*a*1.3 - b ) * 8.0; | ||
| float4 a = SampleOffset(int2( 1, 1)); | ||
| float4 b = SampleOffset(int2(-1, -1)); | ||
| SetOutput(( a*a*1.3 - b ) * 8.0); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,15 @@ | ||
| SAMPLER_BINDING(9) uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| uniform vec4 resolution; | ||
|
|
||
| void main() | ||
| { | ||
| vec4 to_gray = vec4(0.3,0.59,0.11,0); | ||
| float4 to_gray = float4(0.3,0.59,0.11,0); | ||
|
|
||
| float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw)); | ||
| float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw)); | ||
| float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw)); | ||
| float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw)); | ||
| float x1 = dot(to_gray, SampleOffset(int2( 1, 1))); | ||
| float x0 = dot(to_gray, SampleOffset(int2(-1,-1))); | ||
| float x3 = dot(to_gray, SampleOffset(int2( 1,-1))); | ||
| float x2 = dot(to_gray, SampleOffset(int2(-1, 1))); | ||
|
|
||
| float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2); | ||
|
|
||
| float4 color = texture(samp9, uv0).rgba; | ||
| float4 color = Sample(); | ||
|
|
||
| ocol0 = color - vec4(edge, edge, edge, edge) * 12.0; | ||
| SetOutput(color - float4(edge, edge, edge, edge) * 12.0); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.