-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7e189a
commit 63e9329
Showing
10 changed files
with
16,377 additions
and
15,390 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
precision highp float; | ||
varying vec3 v_normal; | ||
uniform vec4 u_diffuse; | ||
uniform float u_transparency; | ||
void main(void) { | ||
vec3 normal = normalize(v_normal); | ||
vec4 color = vec4(0., 0., 0., 0.); | ||
vec4 diffuse = vec4(0., 0., 0., 1.); | ||
diffuse = u_diffuse; | ||
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.); | ||
color.xyz += diffuse.xyz; | ||
color = vec4(color.rgb * diffuse.a, diffuse.a); | ||
color = vec4(color.rgb * diffuse.a, diffuse.a * u_transparency); | ||
gl_FragColor = color; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.