royibernthal Posted February 24, 2018 Share Posted February 24, 2018 I'm trying to migrate to the latest version and it seems Engine/setAlphaTesting() no longer exists. What is the alternative? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 25, 2018 Share Posted February 25, 2018 Looks like it is unnecessary now: https://github.com/BabylonJS/Babylon.js/commit/ab9cb1af819200577b48e9008e8df701fdd19c6a#diff-17c850aa91890c42f3d3d7cf166b2b94 Make sure you set needAlphaTesting on shaders/materials. Have you run into any issues? Quote Link to comment Share on other sites More sharing options...
royibernthal Posted February 25, 2018 Author Share Posted February 25, 2018 I'm precompiling shaders so that they are uploaded to GPU during preloading screen. I'll need to test to see if any shaders are uploaded after that screen (which would mean there are problems). It does seem unnecessary now, however in that context, what do you think? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 25, 2018 Share Posted February 25, 2018 7 hours ago, royibernthal said: It does seem unnecessary now, however in that context, what do you think? Since we're writing shaders we know if we used a vec4(x,y,z,w < 1.0) or discard, so it kind of makes sense. Here is more info from Khronos Group, if you're interested. glEnable(GL_ALPHA_TEST); Was deprecated in OpenGL 3.0 -- *NOT* WebGL afaik. WebGL is based on OpenGL ES 2.0: https://www.khronos.org/opengl/wiki/Transparency_Sorting#Alpha_test Quote Link to comment Share on other sites More sharing options...
royibernthal Posted February 25, 2018 Author Share Posted February 25, 2018 I'm not much of a shaders guy, just making sure they're compiled at the right time. I read the alpha test section - I understood the concept but that's about it. So in other words, given this method was not deprecated in WebGL, did bjs stop using it regardless? Is it certainly unnecessary now? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 25, 2018 Share Posted February 25, 2018 1 hour ago, royibernthal said: Is it certainly unnecessary now? I couldn't say really. Not too sure about the gory details, but WebGL 2.0 conforms closely to OpenGL ES 3.0, so I think it's just a forward looking step Quote Link to comment Share on other sites More sharing options...
royibernthal Posted February 26, 2018 Author Share Posted February 26, 2018 Got it, thanks I'd love to know the gory details though to make sure it's fine, Deltakosh? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2018 Share Posted February 26, 2018 I confirm, this is no more required at engine level as we are only using the info from the material (the engine level info was redundant) So you are good to go Quote Link to comment Share on other sites More sharing options...
royibernthal Posted February 26, 2018 Author Share Posted February 26, 2018 Okay great 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.