-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from CesiumGS/duplicate-resources
Don't duplicate resources that are referenced multiple times
- Loading branch information
Showing
10 changed files
with
688 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
18 changes: 18 additions & 0 deletions
18
specs/data/2.0/box-shared-image-references-separate/CesiumTexturedBoxTest0FS.glsl
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
precision highp float; | ||
varying vec3 v_normal; | ||
varying vec2 v_texcoord0; | ||
uniform sampler2D u_diffuse; | ||
uniform vec4 u_specular; | ||
uniform float u_shininess; | ||
void main(void) { | ||
vec3 normal = normalize(v_normal); | ||
vec4 color = vec4(0., 0., 0., 0.); | ||
vec4 diffuse = vec4(0., 0., 0., 1.); | ||
vec4 specular; | ||
diffuse = texture2D(u_diffuse, v_texcoord0); | ||
specular = u_specular; | ||
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.); | ||
color.xyz += diffuse.xyz; | ||
color = vec4(color.rgb * diffuse.a, diffuse.a); | ||
gl_FragColor = color; | ||
} |
15 changes: 15 additions & 0 deletions
15
specs/data/2.0/box-shared-image-references-separate/CesiumTexturedBoxTest0VS.glsl
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
precision highp float; | ||
attribute vec3 a_position; | ||
attribute vec3 a_normal; | ||
varying vec3 v_normal; | ||
uniform mat3 u_normalMatrix; | ||
uniform mat4 u_modelViewMatrix; | ||
uniform mat4 u_projectionMatrix; | ||
attribute vec2 a_texcoord0; | ||
varying vec2 v_texcoord0; | ||
void main(void) { | ||
vec4 pos = u_modelViewMatrix * vec4(a_position,1.0); | ||
v_normal = u_normalMatrix * a_normal; | ||
v_texcoord0 = a_texcoord0; | ||
gl_Position = u_projectionMatrix * pos; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+840 Bytes
specs/data/2.0/box-shared-image-references-separate/box-shared-image-references-separate.bin
Binary file not shown.
Oops, something went wrong.