summary refs log tree commit diff stats
path: root/shaders/final.fragment
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-02-21 15:22:21 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-02-21 15:22:21 -0500
commit59860415a2782694f630f7803ae4bcf445b3f5f1 (patch)
tree6c5dade6c2915cc68d69d536b465a5c6d7bd53fc /shaders/final.fragment
parente3e5a247c58c6e0b45d81ab61314bd8d1bd530ac (diff)
downloadtherapy-59860415a2782694f630f7803ae4bcf445b3f5f1.tar.gz
therapy-59860415a2782694f630f7803ae4bcf445b3f5f1.tar.bz2
therapy-59860415a2782694f630f7803ae4bcf445b3f5f1.zip
Player can short jump
Diffstat (limited to 'shaders/final.fragment')
-rw-r--r--shaders/final.fragment16
1 files changed, 1 insertions, 15 deletions
diff --git a/shaders/final.fragment b/shaders/final.fragment index 4a51ad3..f9d8995 100644 --- a/shaders/final.fragment +++ b/shaders/final.fragment
@@ -4,7 +4,6 @@ in vec2 UV;
4in vec3 normIn; 4in vec3 normIn;
5in vec3 camDirIn; 5in vec3 camDirIn;
6in vec3 lightDirIn; 6in vec3 lightDirIn;
7//in vec3 vertPos;
8 7
9out vec3 color; 8out vec3 color;
10 9
@@ -53,7 +52,6 @@ void main()
53 vec3 norm = normalize(normIn); 52 vec3 norm = normalize(normIn);
54 vec3 camDir = normalize(camDirIn); 53 vec3 camDir = normalize(camDirIn);
55 vec3 lightDir = normalize(lightDirIn); 54 vec3 lightDir = normalize(lightDirIn);
56 //vec3 refl = reflect(camDir, normIn);
57 55
58 float diffuse = clamp(dot(norm, lightDir), 0.0f, 1.0f); 56 float diffuse = clamp(dot(norm, lightDir), 0.0f, 1.0f);
59 vec4 colordiff = vec4(0.175, 0.15, 0.2, 1) * diffuse * Tuning_Diff_Brightness; 57 vec4 colordiff = vec4(0.175, 0.15, 0.2, 1) * diffuse * Tuning_Diff_Brightness;
@@ -65,19 +63,7 @@ void main()
65 63
66 float fres = 1.0f - dot(camDir, norm); 64 float fres = 1.0f - dot(camDir, norm);
67 fres = (fres*fres) * Tuning_Fres_Brightness; 65 fres = (fres*fres) * Tuning_Fres_Brightness;
68 vec4 colorfres = vec4(0.45, 0.4, 0.5, 1) * fres;/* 66 vec4 colorfres = vec4(0.45, 0.4, 0.5, 1) * fres;
69
70 float lambertian = max(dot(camDirNorm,norm),0.0);
71 vec4 colorspec = vec4(0.0);
72 vec4 colorfres = vec4(0.0);
73 vec4 colordiff = vec4(0.175,0.15,0.2,1) * lambertian * Tuning_Diff_Brightness;
74 if (lambertian > 0.0)
75 {
76 vec3 viewDir = normalize(-vertPos);
77 vec3 halfDir = normalize(camDirNorm + viewDir);
78 float specAngle = max(dot(halfDir, normnorm), 0.0);
79 colorspec = vec4(0.25,0.25,0.25,1) * pow(specAngle, Tuning_Spec_Power) * Tuning_Spec_Brightness;
80 }*/
81 67
82 vec4 emissive = sampleCRT(UV); 68 vec4 emissive = sampleCRT(UV);
83 69