CorayThan Posted December 4, 2018 Share Posted December 4, 2018 I'm trying to create a 2D plane with the normal alpha of the PNG I'm applying to it as a texture. The PNG as a gradient. I can get the mesh plane to use alpha, but it makes the image into a solid block of color instead of using the normal alpha. How do I fix this so it uses the alpha gradient? https://www.babylonjs-playground.com/#1U5KWI Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 5, 2018 Share Posted December 5, 2018 hi @CorayThan https://www.babylonjs-playground.com/#1U5KWI#1 ssaket 1 Quote Link to comment Share on other sites More sharing options...
CorayThan Posted December 5, 2018 Author Share Posted December 5, 2018 Thanks Nasimi! Unfortunately I can't get it to work in my project. I'm using Typescript and the "CustomMaterial" constructor doesn't resolve. Even when I tried ignoring the errors it apparently isn't a constructor: Uncaught TypeError: BABYLON.CustomMaterial is not a constructor I switched the playground to be the same version of Babylon I'm using too, so not sure what's going on there. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2018 Share Posted December 5, 2018 You need to add a reference to the material library: https://github.com/BabylonJS/Babylon.js/tree/master/materialsLibrary Sebavan and NasimiAsl 2 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.