Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Fixed transparency in original collada files
Browse files Browse the repository at this point in the history
The problem was with the original collada files. Fixed transparency and
regenerated all models.
  • Loading branch information
sbtron committed Dec 27, 2016
1 parent f40782b commit 9d89005
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 138 deletions.
2 changes: 1 addition & 1 deletion 1.0/Avocado/collada/Avocado.dae
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<float sid="shininess">20</float>
</shininess>
<transparency>
<float sid="transparency">0</float>
<float sid="transparency">1.0</float>
</transparency>
<bump>
<texture texture="m0Avocado_M-normal-sampler" texcoord="CHANNEL0" />
Expand Down
Binary file modified 1.0/Avocado/glTF-Binary/Avocado.glb
Binary file not shown.
303 changes: 303 additions & 0 deletions 1.0/Avocado/glTF-Embedded/Avocado.gltf

Large diffs are not rendered by default.

30 changes: 5 additions & 25 deletions 1.0/Avocado/glTF/Avocado.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"animations": {},
"asset": {
"generator": "collada2gltf@bf2782288b99d9d4e819b92772b343810d29933d",
"generator": "collada2gltf@f8f6279915175e9d2cc525531660ac439c114fac",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
Expand Down Expand Up @@ -131,8 +131,7 @@
1
],
"shininess": 20,
"specular": "texture_m0Avocado_M-specular-image",
"transparency": 1.0
"specular": "texture_m0Avocado_M-specular-image"
}
}
},
Expand Down Expand Up @@ -246,32 +245,14 @@
"texcoord0": {
"semantic": "TEXCOORD_0",
"type": 35664
},
"transparency": {
"type": 5126
}
},
"program": "program_0",
"states": {
"enable": [
2929,
3042
],
"functions": {
"blendEquationSeparate": [
32774,
32774
],
"blendFuncSeparate": [
1,
771,
1,
771
],
"depthMask": [
false
]
}
2884
]
},
"uniforms": {
"u_ambient": "ambient",
Expand All @@ -281,8 +262,7 @@
"u_normalMatrix": "normalMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_shininess": "shininess",
"u_specular": "specular",
"u_transparency": "transparency"
"u_specular": "specular"
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions 1.0/Avocado/glTF/Avocado0FS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ uniform sampler2D u_diffuse;
uniform vec4 u_emission;
uniform sampler2D u_specular;
uniform float u_shininess;
uniform float u_transparency;
void main(void) {
vec3 normal = normalize(v_normal);
vec4 color = vec4(0., 0., 0., 0.);
Expand All @@ -21,6 +20,6 @@ specular = texture2D(u_specular, v_texcoord0);
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.);
color.xyz += diffuse.xyz;
color.xyz += emission.xyz;
color = vec4(color.rgb * diffuse.a, diffuse.a * u_transparency);
color = vec4(color.rgb * diffuse.a, diffuse.a);
gl_FragColor = color;
}
2 changes: 1 addition & 1 deletion 1.0/BarramundiFish/collada/BarramundiFish.dae
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<float sid="shininess">20</float>
</shininess>
<transparency>
<float sid="transparency">0</float>
<float sid="transparency">1.0</float>
</transparency>
<bump>
<texture texture="m0mtl_barramundi_fish-normal-sampler" texcoord="CHANNEL0" />
Expand Down
Binary file modified 1.0/BarramundiFish/glTF-Binary/BarramundiFish.glb
Binary file not shown.
30 changes: 5 additions & 25 deletions 1.0/BarramundiFish/glTF-Embedded/BarramundiFish.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
},
"animations": {},
"asset": {
"generator": "collada2gltf@bf2782288b99d9d4e819b92772b343810d29933d",
"generator": "collada2gltf@f8f6279915175e9d2cc525531660ac439c114fac",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
Expand Down Expand Up @@ -324,8 +324,7 @@
1
],
"shininess": 20,
"specular": "texture_m0mtl_barramundi_fish-specular-image",
"transparency": 1
"specular": "texture_m0mtl_barramundi_fish-specular-image"
}
}
},
Expand Down Expand Up @@ -432,7 +431,7 @@
"sh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Qp9DQo="
},
"BarramundiFish0VS": {
"type": 35633,
Expand Down Expand Up @@ -486,32 +485,14 @@
"texcoord0": {
"semantic": "TEXCOORD_0",
"type": 35664
},
"transparency": {
"type": 5126
}
},
"program": "program_0",
"states": {
"enable": [
2929,
3042
2884
],
"functions": {
"blendEquationSeparate": [
32774,
32774
],
"blendFuncSeparate": [
1,
771,
1,
771
],
"depthMask": [
false
]
},
"disable": []
},
"uniforms": {
Expand All @@ -522,8 +503,7 @@
"u_normalMatrix": "normalMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_shininess": "shininess",
"u_specular": "specular",
"u_transparency": "transparency"
"u_specular": "specular"
}
}
},
Expand Down
30 changes: 5 additions & 25 deletions 1.0/BarramundiFish/glTF/BarramundiFish.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
},
"animations": {},
"asset": {
"generator": "collada2gltf@bf2782288b99d9d4e819b92772b343810d29933d",
"generator": "collada2gltf@f8f6279915175e9d2cc525531660ac439c114fac",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
Expand Down Expand Up @@ -328,8 +328,7 @@
1
],
"shininess": 20,
"specular": "texture_m0mtl_barramundi_fish-specular-image",
"transparency": 1.0
"specular": "texture_m0mtl_barramundi_fish-specular-image"
}
}
},
Expand Down Expand Up @@ -716,32 +715,14 @@
"texcoord0": {
"semantic": "TEXCOORD_0",
"type": 35664
},
"transparency": {
"type": 5126
}
},
"program": "program_0",
"states": {
"enable": [
2929,
3042
],
"functions": {
"blendEquationSeparate": [
32774,
32774
],
"blendFuncSeparate": [
1,
771,
1,
771
],
"depthMask": [
false
]
}
2884
]
},
"uniforms": {
"u_ambient": "ambient",
Expand All @@ -751,8 +732,7 @@
"u_normalMatrix": "normalMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_shininess": "shininess",
"u_specular": "specular",
"u_transparency": "transparency"
"u_specular": "specular"
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions 1.0/BarramundiFish/glTF/BarramundiFish0FS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ uniform sampler2D u_diffuse;
uniform vec4 u_emission;
uniform sampler2D u_specular;
uniform float u_shininess;
uniform float u_transparency;
void main(void) {
vec3 normal = normalize(v_normal);
vec4 color = vec4(0., 0., 0., 0.);
Expand All @@ -21,6 +20,6 @@ specular = texture2D(u_specular, v_texcoord0);
diffuse.xyz *= max(dot(normal,vec3(0.,0.,1.)), 0.);
color.xyz += diffuse.xyz;
color.xyz += emission.xyz;
color = vec4(color.rgb * diffuse.a, diffuse.a * u_transparency);
color = vec4(color.rgb * diffuse.a, diffuse.a);
gl_FragColor = color;
}
2 changes: 1 addition & 1 deletion 1.0/SmilingFace/collada/SmilingFace.dae
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<float sid="shininess">20</float>
</shininess>
<transparency>
<float sid="transparency">0</float>
<float sid="transparency">1.0</float>
</transparency>
</phong>
</technique>
Expand Down
Binary file modified 1.0/SmilingFace/glTF-Binary/SmilingFace.glb
Binary file not shown.
30 changes: 5 additions & 25 deletions 1.0/SmilingFace/glTF-Embedded/SmilingFace.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"animations": {},
"asset": {
"generator": "collada2gltf@bf2782288b99d9d4e819b92772b343810d29933d",
"generator": "collada2gltf@f8f6279915175e9d2cc525531660ac439c114fac",
"premultipliedAlpha": true,
"profile": {
"api": "WebGL",
Expand Down Expand Up @@ -127,8 +127,7 @@
1
],
"shininess": 20,
"specular": "texture_m0smiling_face_DF-specular-image",
"transparency": 1
"specular": "texture_m0smiling_face_DF-specular-image"
}
}
},
Expand Down Expand Up @@ -205,7 +204,7 @@
"shaders": {
"SmilingFace0FS": {
"type": 35632,
"uri": "data:text/plain;base64,cHJlY2lzaW9uIGhpZ2hwIGZsb2F0Ow0KdmFyeWluZyB2ZWMzIHZfbm9ybWFsOw0KdW5pZm9ybSB2ZWM0IHVfYW1iaWVudDsNCnZhcnl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mcgdmVjMiB2X3RleGNvb3JkMDsNCnVuaWZvcm0gc2FtcGxlcjJEIHVfZGlmZnVzZTsNCnVuaWZvcm0gdmVjNCB1X2VtaXNzaW9uOw0KdW5pZm9ybSBzYW1wbGVyMkQgdV9zcGVjdWxhcjsNCnVuaWZvcm0gZmxvYXQgdV9zaGluaW5lc3M7DQp2b2lkIG1haW4odm9pZCkgew0KdmVjMyBub3JtYWwgPSBub3JtYWxpemUodl9ub3JtYWwpOw0KdmVjNCBjb2xvciA9IHZlYzQoMC4sIDAuLCAwLiwgMC4pOw0KdmVjNCBkaWZmdXNlID0gdmVjNCgwLiwgMC4sIDAuLCAxLik7DQp2ZWM0IGVtaXNzaW9uOw0KdmVjNCBhbWJpZW50Ow0KdmVjNCBzcGVjdWxhcjsNCmFtYmllbnQgPSB1X2FtYmllbnQ7DQpkaWZmdXNlID0gdGV4dHVyZTJEKHVfZGlmZnVzZSwgdl90ZXhjb29yZDApOw0KZW1pc3Npb24gPSB1X2VtaXNzaW9uOw0Kc3BlY3VsYXIgPSB0ZXh0dXJlMkQodV9zcGVjdWxhciwgdl90ZXhjb29yZDApOw0KZGlmZnVzZS54eXogKj0gbWF4KGRvdChub3JtYWwsdmVjMygwLiwwLiwxLikpLCAwLik7DQpjb2xvci54eXogKz0gZGlmZnVzZS54eXo7DQpjb2xvci54eXogKz0gZW1pc3Npb24ueHl6Ow0KY29sb3IgPSB2ZWM0KGNvbG9yLnJnYiAqIGRpZmZ1c2UuYSwgZGlmZnVzZS5hKTsNCmdsX0ZyYWdDb2xvciA9IGNvbG9yOw0KfQ0K"
},
"SmilingFace0VS": {
"type": 35633,
Expand Down Expand Up @@ -259,32 +258,14 @@
"texcoord0": {
"semantic": "TEXCOORD_0",
"type": 35664
},
"transparency": {
"type": 5126
}
},
"program": "program_0",
"states": {
"enable": [
2929,
3042
2884
],
"functions": {
"blendEquationSeparate": [
32774,
32774
],
"blendFuncSeparate": [
1,
771,
1,
771
],
"depthMask": [
false
]
},
"disable": []
},
"uniforms": {
Expand All @@ -295,8 +276,7 @@
"u_normalMatrix": "normalMatrix",
"u_projectionMatrix": "projectionMatrix",
"u_shininess": "shininess",
"u_specular": "specular",
"u_transparency": "transparency"
"u_specular": "specular"
}
}
},
Expand Down
Binary file modified 1.0/SmilingFace/glTF/SmilingFace.bin
Binary file not shown.
Loading

0 comments on commit 9d89005

Please sign in to comment.