bestog Posted September 24, 2018 Share Posted September 24, 2018 Hello, I updated my app from BJS 3.2.0 to BJS 3.3.0-rc3 to prepare for the new features. I noticed that my white color on the texture is no longer considered as transparency, but remains white. SHADER-CODE BABYLON.Effect.ShadersStore.shadowPlaneVertexShader = '\r\n' + // Precision 'precision highp float;\r\n' + // Attributes 'attribute vec3 position;\r\n' + 'attribute vec2 uv;\r\n' + // Uniforms 'uniform mat4 world;\r\n' + 'uniform mat4 worldViewProjection;\r\n' + // Varying 'varying vec2 vUV;\r\n' + // MAIN 'void main(void) {\r\n' + ' vec4 p = vec4(position, 1.0);\r\n' + ' gl_Position = worldViewProjection * p;\r\n' + ' vUV = uv;\r\n' + '}\r\n'; /** * Custom fragment shader * @type {string} */ BABYLON.Effect.ShadersStore.shadowPlaneFragmentShader = '\r\n' + // Precision 'precision highp float;\r\n' + // Varying 'varying vec2 vUV;\r\n' + // Uniforms - Diffuse 'uniform sampler2D diffuseTexture;\r\n' + // MAIN 'void main(void) {\r\n' + ' gl_FragColor = texture2D(diffuseTexture, vUV);\r\n' + '}\r\n'; CALL material = new BABYLON.ShaderMaterial( _.uniqueId('shadow'), scene, { vertexElement: 'shadowPlane', fragmentElement: 'shadowPlane' }, { attributes: ['position', 'uv'], uniforms: ['world', 'worldViewProjection'], needAlphaBlending: true } ); material.alphaMode = BABYLON.Engine.ALPHA_COMBINE; material.setTexture('diffuseTexture', [image with white background and black gradient]); mesh.material = material; Does anyone know why this is suddenly no longer possible? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 24, 2018 Share Posted September 24, 2018 Should be fine now.. I stumbled up the same issue and I fixed it for rc4 Quote Link to comment Share on other sites More sharing options...
bestog Posted September 25, 2018 Author Share Posted September 25, 2018 @Deltakosh rc4 worked perfectly. Much thanks. ? GameMonetize 1 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.