diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-23 10:49:56 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-02-23 10:49:56 -0500 |
commit | 0751446e1d069263d25abcff49a32a380231709a (patch) | |
tree | af47582053b30d018c3f1d02e0462aa1eab1b6bb /shaders/final.fragment | |
parent | cecdba5cd996cea3ebd2534aea7a3e3a41205b9c (diff) | |
download | therapy-0751446e1d069263d25abcff49a32a380231709a.tar.gz therapy-0751446e1d069263d25abcff49a32a380231709a.tar.bz2 therapy-0751446e1d069263d25abcff49a32a380231709a.zip |
Rewrote bloom so it's not super slow, also removed the frame from the screen mesh
Diffstat (limited to 'shaders/final.fragment')
-rw-r--r-- | shaders/final.fragment | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shaders/final.fragment b/shaders/final.fragment index f9d8995..b6c49a8 100644 --- a/shaders/final.fragment +++ b/shaders/final.fragment | |||
@@ -12,11 +12,11 @@ uniform sampler2D scanlinestex; | |||
12 | 12 | ||
13 | const float Tuning_Overscan = 1.08; | 13 | const float Tuning_Overscan = 1.08; |
14 | const float Tuning_Dimming = 0.0; | 14 | const float Tuning_Dimming = 0.0; |
15 | const float Tuning_Satur = 1.0; | 15 | const float Tuning_Satur = 1.13; |
16 | const float Tuning_ReflScalar = 0.3; | 16 | const float Tuning_ReflScalar = 0.3; |
17 | const float Tuning_Barrel = 0; //0.12; | 17 | const float Tuning_Barrel = 0;//0.12; |
18 | const float Tuning_Scanline_Brightness = 0.45; | 18 | const float Tuning_Scanline_Brightness = 0.45; |
19 | const float Tuning_Scanline_Opacity = 0.5; | 19 | const float Tuning_Scanline_Opacity = 0.55; |
20 | const float Tuning_Diff_Brightness = 0.75; | 20 | const float Tuning_Diff_Brightness = 0.75; |
21 | const float Tuning_Spec_Brightness = 0.35; | 21 | const float Tuning_Spec_Brightness = 0.35; |
22 | const float Tuning_Spec_Power = 50.0; | 22 | const float Tuning_Spec_Power = 50.0; |
@@ -26,7 +26,7 @@ uniform vec2 resolution; | |||
26 | 26 | ||
27 | vec4 sampleCRT(vec2 uv) | 27 | vec4 sampleCRT(vec2 uv) |
28 | { | 28 | { |
29 | vec2 CRTMask_Scale = resolution / vec2(6.0, 5.0); | 29 | vec2 CRTMask_Scale = vec2(320.0,200.0) / vec2(2.0, 1.0); |
30 | 30 | ||
31 | vec2 scanuv = uv * CRTMask_Scale; | 31 | vec2 scanuv = uv * CRTMask_Scale; |
32 | vec3 scantex = texture(scanlinestex, scanuv).rgb; | 32 | vec3 scantex = texture(scanlinestex, scanuv).rgb; |
@@ -61,7 +61,7 @@ void main() | |||
61 | spec = pow(spec, Tuning_Spec_Power); | 61 | spec = pow(spec, Tuning_Spec_Power); |
62 | vec4 colorspec = vec4(0.25, 0.25, 0.25, 1) * spec * Tuning_Spec_Brightness; | 62 | vec4 colorspec = vec4(0.25, 0.25, 0.25, 1) * spec * Tuning_Spec_Brightness; |
63 | 63 | ||
64 | float fres = 1.0f - dot(camDir, norm); | 64 | float fres = 1.0 - dot(camDir, norm); |
65 | fres = (fres*fres) * Tuning_Fres_Brightness; | 65 | fres = (fres*fres) * Tuning_Fres_Brightness; |
66 | vec4 colorfres = vec4(0.45, 0.4, 0.5, 1) * fres; | 66 | vec4 colorfres = vec4(0.45, 0.4, 0.5, 1) * fres; |
67 | 67 | ||