summary refs log tree commit diff stats
path: root/shaders/final.fragment
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-02-23 10:49:56 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-02-23 10:49:56 -0500
commit0751446e1d069263d25abcff49a32a380231709a (patch)
treeaf47582053b30d018c3f1d02e0462aa1eab1b6bb /shaders/final.fragment
parentcecdba5cd996cea3ebd2534aea7a3e3a41205b9c (diff)
downloadtherapy-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.fragment10
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
13const float Tuning_Overscan = 1.08; 13const float Tuning_Overscan = 1.08;
14const float Tuning_Dimming = 0.0; 14const float Tuning_Dimming = 0.0;
15const float Tuning_Satur = 1.0; 15const float Tuning_Satur = 1.13;
16const float Tuning_ReflScalar = 0.3; 16const float Tuning_ReflScalar = 0.3;
17const float Tuning_Barrel = 0; //0.12; 17const float Tuning_Barrel = 0;//0.12;
18const float Tuning_Scanline_Brightness = 0.45; 18const float Tuning_Scanline_Brightness = 0.45;
19const float Tuning_Scanline_Opacity = 0.5; 19const float Tuning_Scanline_Opacity = 0.55;
20const float Tuning_Diff_Brightness = 0.75; 20const float Tuning_Diff_Brightness = 0.75;
21const float Tuning_Spec_Brightness = 0.35; 21const float Tuning_Spec_Brightness = 0.35;
22const float Tuning_Spec_Power = 50.0; 22const float Tuning_Spec_Power = 50.0;
@@ -26,7 +26,7 @@ uniform vec2 resolution;
26 26
27vec4 sampleCRT(vec2 uv) 27vec4 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