Samuel Girardin Posted May 6, 2015 Share Posted May 6, 2015 Hi guys, maybe one of you have encountered my problem . I try to deal with alpha on a dynamic texture created with context2d and imageData. It works but when I change the "fourth index => alpha". Nothing happens.[Edit] data[j + 3] < 102; object is not visible and >102 object is visible ? Here is a small playground, if someone can have a look ? http://www.babylonjs-playground.com/#1P3JT4#1 thanks sam Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 6, 2015 Share Posted May 6, 2015 The alpha test threshold is at 0.4 (102):https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Shaders/default.fragment.fx#L491 Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted May 7, 2015 Author Share Posted May 7, 2015 ok but is there a way to render alpha when you create texure with context2d ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 7, 2015 Share Posted May 7, 2015 in this case put your texture in mat.opacityTexture Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.