paleRider Posted May 12, 2017 Share Posted May 12, 2017 Hi everybody! I get the following errors (relevant excerpt) in the console: BJS - [13:19:53]: Unable to compile effect:... ... BJS - [13:19:53]: Error: ERROR: 0:1001: 'vBumpInfos' : undeclared identifier ERROR: 0:1001: 'y' : field selection requires structure or vector on left hand side meanwhile trying to add a normal map (by means of bump texture) to any PBR Material. My material definition is: var myMaterial=new BABYLON.PBRMaterial("plastic",Scene); myMaterial.reflectionTexture=txtHDR; myMaterial.bumpTexture=new BABYLON.Texture("assets/textures/11_onetile.png",Scene); myMaterial.cameraExposure=exposure; myMaterial.cameraContrast=contrast; myMaterial.microSurface=0.96; myMaterial.albedoColor=BABYLON.Color3.White(); myMaterial.albedoTexture=new BABYLON.Texture("assets/textures/QIS_Exterior_BaseColor.png",Scene); myMaterial.reflectivityColor=new BABYLON.Color3(0.07,0.07,0.07); myMaterial.metallicTexture=new BABYLON.Texture("assets/textures/QIS_Exterior_Metallic_PBR.png",Scene); myMaterial.useRoughnessFromMetallicTextureAlpha=false; myMaterial.useRoughnessFromMetallicTextureGreen=true; If I remove the offending line: myMaterial.bumpTexture=new BABYLON.Texture("assets/textures/11_onetile.png",Scene); the material works flawless (but of course without normal map). My question: Are BJS PBR Materials compatible with Normal Maps? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 12, 2017 Share Posted May 12, 2017 Hey! we fixed it few days ago..Did you get the latest version on the repo? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted May 17, 2017 Share Posted May 17, 2017 Was this related to line ending? Because I once noticed that when line ending is linux style for the vertex file, BJS cannot compile this kind of line: // varying varying vec2 vUV; Error is 'vUV' : undeclared identifier To work properly, the code has to be: // varying varying vec2 vUV; (with a blank line) Quote Link to comment Share on other sites More sharing options...
Sebavan Posted May 18, 2017 Share Posted May 18, 2017 This is now track here: https://github.com/BabylonJS/Babylon.js/issues/2139 We are on it. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted May 18, 2017 Share Posted May 18, 2017 Fixed, thx 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.