diff options
author | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-18 01:28:35 -0600 |
---|---|---|
committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2014-04-18 01:28:35 -0600 |
commit | e4754131548a55fea393d6fc9245b20fcd60c62c (patch) | |
tree | 8ad371c87c22844a4e1762ef5396c894cbd813f1 /shaders/water.frag | |
parent | 915cda147b565880fecefe5f82ca242bad6114fc (diff) | |
download | terralloc-e4754131548a55fea393d6fc9245b20fcd60c62c.tar.gz terralloc-e4754131548a55fea393d6fc9245b20fcd60c62c.tar.bz2 terralloc-e4754131548a55fea393d6fc9245b20fcd60c62c.zip |
starting tesselation shader
Diffstat (limited to 'shaders/water.frag')
-rw-r--r-- | shaders/water.frag | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/shaders/water.frag b/shaders/water.frag index 9298d15..82b8163 100644 --- a/shaders/water.frag +++ b/shaders/water.frag @@ -36,12 +36,13 @@ vec3 calNormChange( vec3 norm, vec3 down, vec3 right ) { } void main() { - vec3 down = vec3( 0, -1, 0 ) ; - vec3 right = normalize(cross( normal, down )) ; - down = normalize(cross( normal, right ) ); - vec3 newNorm = calNormChange( normal, down, right ) ; - - float coef = dot( normalize(vec3(lightPos) - vec3(position)), normalize(newNorm) ) ; - vec4 color = texture2D(texture,texpos) ; - frag_color = vec4(color.xyz * vec3(0.0,0.4,0.7) * coef,0.8); +// vec3 down = vec3( 0, -1, 0 ) ; +// vec3 right = normalize(cross( normal, down )) ; +// down = normalize(cross( normal, right ) ); +// vec3 newNorm = calNormChange( normal, down, right ) ; +// +// float coef = dot( normalize(vec3(lightPos) - vec3(position)), normalize(newNorm) ) ; +// vec4 color = texture2D(texture,texpos) ; +// frag_color = vec4(color.xyz * vec3(0.0,0.4,0.7) * coef,0.8); + frag_color = vec4(0,0,1,0.8) ; } |