3Dlove Posted March 15, 2015 Share Posted March 15, 2015 Hello guys, My example : http://www.babylonjs-playground.com/#1C4GCW#2 I have a little issue using a canvas in a texture : 1- why the transparency isn't applicated for the background color of my canvas ?context1.fillStyle="rgba(240,240,240,0.5)";alpha is 50% 2- why is show a grey part at right and bottom ?yet, I used the good dimensions :{width:rectSize.width, height:rectSize.height} Thanks for your help :-) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 16, 2015 Share Posted March 16, 2015 Hello! 1. Only diffuseTexture can apply alpha testing2. You have to ask the correct size of your dynamicTExture because due to WebGL restrictions, textures have to be power of 2 Working example:http://www.babylonjs-playground.com/#1C4GCW#4 3Dlove 1 Quote Link to comment Share on other sites More sharing options...
3Dlove Posted March 16, 2015 Author Share Posted March 16, 2015 Thank you :-) Ok for 2^x size of canvas. So, it's not possible to draw a text with a transparent background and an emissive texture, tell me if I'm wrong. How to write a pure red text (strong red like in emissive) with a diffuse Texture ? (if a want a transparent background) Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 16, 2015 Share Posted March 16, 2015 Just add a white emissive color:http://www.babylonjs-playground.com/#1C4GCW#5 (line 48) 3Dlove 1 Quote Link to comment Share on other sites More sharing options...
3Dlove Posted March 16, 2015 Author Share Posted March 16, 2015 ooh yeaaah great ! =)I tried with Black^^, it's White haha =D 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.