const material = new PBRMaterial(“spritePBRMat”, scene);
material.albedoTexture = spriteTexture;
material.albedoColor = new Color3(2, 2, 2);
material.albedoTexture.hasAlpha = true;
material.useAlphaFromAlbedoTexture = true;
material.directIntensity = 9;
material.roughness = 0;
material.metallic = 0.0;
material.disableLighting = false;
material.backFaceCulling = true;
material.usePhysicalLightFalloff = false
material.transparencyMode = PBRMaterial.PBRMATERIAL_ALPHABLEND;
plane.material = material;
plane.billboardMode = Mesh.BILLBOARDMODE_ALL;
Note: if I added plane.receiveShadows = true; then the light is no longer affecting this sprite, I found out that when I dont use albedoTexture, just albedoColor it works great light and shadows, is this the limitation of babylonjs, or I missed something
TIA