Tokkno

Dynamic textures - transparence

Recommended Posts

Hello,

 

I'm new in babylonjs and i develop a game viewer with server (with socket.io). But for few days, i have a problem. I use dynamic textures for my textures because i want to modify textures without recreating them.

I can't use playground because my code depend of a server and nothing will appear in playground without the server. I will take screen and i have a little idea of the source of problem.

When i use texture.clear(), i have the texture that i want but with a black background (i want a transparent background).

When i don't use texture.clear, the background is transparent but the image is not perfect.

 

Thank's for your attention

 

Ps: Sorry for language mistakes, i'm french.

 

with clear.PNG

without clear.PNG

code.PNG

Share this post


Link to post
Share on other sites
16 hours ago, Deltakosh said:

If this is not what you want please provide a repro in the playground, I'll make it work for you

Thank's

 

I write the code on playground but i can't upload the img src so i give you them separately.

img.src didn't work with external image hoster because it's unsecure. I give you the playground and the image.

Playground URL : https://www.babylonjs-playground.com/#WRNZ81#4

img URL : https://image.ibb.co/nr4VMo/10.png

 

 

Thank's for your time.

 

10.png

index.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.