summary refs log tree commit diff stats
path: root/shaders
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-07 14:22:45 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-07 14:22:45 -0500
commitda454bb943929ae649c09ca948e7c83644c35712 (patch)
tree1358ea11b33b17b41c8073df9ddb6228a617f831 /shaders
parent97d7fb425da906947cc45e11fadb35f708da50d6 (diff)
parent1e8de01d3704c584e43e1b84947487c2aaddb7d7 (diff)
downloadtherapy-da454bb943929ae649c09ca948e7c83644c35712.tar.gz
therapy-da454bb943929ae649c09ca948e7c83644c35712.tar.bz2
therapy-da454bb943929ae649c09ca948e7c83644c35712.zip
Merge branch 'master' into es-rewrite
Diffstat (limited to 'shaders')
-rw-r--r--shaders/bloom2.fragment12
-rw-r--r--shaders/final.fragment9
-rw-r--r--shaders/final.vertex2
3 files changed, 12 insertions, 11 deletions
diff --git a/shaders/bloom2.fragment b/shaders/bloom2.fragment index da44ea1..4c50e86 100644 --- a/shaders/bloom2.fragment +++ b/shaders/bloom2.fragment
@@ -16,18 +16,18 @@ float nrand(vec2 n)
16void main() 16void main()
17{ 17{
18 color = vec3(0.0); 18 color = vec3(0.0);
19 //color += texture(tex2, UV).rgb / 2.0; 19 color += texture(clearTex, UV).rgb / 2.0;
20 color += texture(blurTex, UV).rgb; 20 color += texture(blurTex, UV).rgb;
21 color = max(vec3(0.0), color - 0.5); 21 color = max(vec3(0.0), color - 0.5);
22 //color *= color; 22 color *= color;
23 23
24 //float flicker = 0.5 + nrand(vec2(iGlobalTime)); 24 float flicker = 0.5 + nrand(vec2(iGlobalTime));
25 //flicker *= (flicker); 25 flicker *= (flicker);
26 //flicker = sqrt(flicker); 26 //flicker = sqrt(flicker);
27 //flicker = pow(flicker, 1.0/8.0); 27 //flicker = pow(flicker, 1.0/8.0);
28 //color *= flicker; 28 //color *= flicker;
29 //color *= mix(vec3(0.0), color, flicker); 29 color *= mix(vec3(0.0), color, flicker);
30 30
31 color += texture(clearTex, UV).rgb; 31 color += texture(clearTex, UV).rgb;
32 //color = clamp(color, vec3(0.0), vec3(1.0)); 32 color = clamp(color, vec3(0.0), vec3(1.0));
33} 33}
diff --git a/shaders/final.fragment b/shaders/final.fragment index b6c49a8..a3ee243 100644 --- a/shaders/final.fragment +++ b/shaders/final.fragment
@@ -15,14 +15,15 @@ const float Tuning_Dimming = 0.0;
15const float Tuning_Satur = 1.13; 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.5;//0.45;
19const float Tuning_Scanline_Opacity = 0.55; 19const float Tuning_Scanline_Opacity = 0.75;//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.5;//0.35;
22const float Tuning_Spec_Power = 50.0; 22const float Tuning_Spec_Power = 50.0;
23const float Tuning_Fres_Brightness = 1.0; 23const float Tuning_Fres_Brightness = 0.0;//1.0;
24 24
25uniform vec2 resolution; 25uniform vec2 resolution;
26uniform vec3 frameColor;
26 27
27vec4 sampleCRT(vec2 uv) 28vec4 sampleCRT(vec2 uv)
28{ 29{
diff --git a/shaders/final.vertex b/shaders/final.vertex index ed6079f..adf266d 100644 --- a/shaders/final.vertex +++ b/shaders/final.vertex
@@ -23,6 +23,6 @@ void main()
23 mat3 invWorldRot = transpose(mat3(worldMat[0].xyz, worldMat[1].xyz, worldMat[2].xyz)); 23 mat3 invWorldRot = transpose(mat3(worldMat[0].xyz, worldMat[1].xyz, worldMat[2].xyz));
24 vec3 worldPos = (worldMat * vec4(vertexPosition_modelspace,1)).xyz; 24 vec3 worldPos = (worldMat * vec4(vertexPosition_modelspace,1)).xyz;
25 25
26 camDirIn = invWorldRot * (vec3(2,0,0) - worldPos); 26 camDirIn = invWorldRot * (vec3(3.75,0,0) - worldPos);
27 lightDirIn = invWorldRot * (Tuning_LightPos - worldPos); 27 lightDirIn = invWorldRot * (Tuning_LightPos - worldPos);
28} 28}