Skip to content

Commit

Permalink
updated logo alpha mask and index.html usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcliffe committed May 17, 2011
1 parent 0ddba18 commit 80b60bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/.DS_Store
.DS_Store
Binary file modified img/logo-alpha.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@
color: new CubicVR.Texture("img/logo.jpg"),
alpha: new CubicVR.Texture("img/logo-alpha.jpg"),
},
opacity: 0.99,
});

var logoMesh = CubicVR.primitives.plane({
Expand Down
6 changes: 5 additions & 1 deletion lib/cubicvr/CubicVR_Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ void main(void)
color = texture2D(colorMap, vec2(texCoord.s, texCoord.t)).rgba;
color.rgb *= mColor;
#endif
if (color.a<=0.9) discard;
if (color.a<=0.9) discard;
#else
color = vec4(mColor,1.0);
#endif

#if hasAlphaMap
color.a = texture2D(alphaMap, texCoord).r;
#if alphaDepth
if (color.a < 0.9) discard;
#else
if (color.a==0.0) discard;
#endif
#else
#if hasAlpha
color.a = mAlpha;
Expand Down

0 comments on commit 80b60bf

Please sign in to comment.