Jump to content

Bump Map throwing strange WebGL errors in my project


thrice
 Share

Recommended Posts

I can't reproduce it in a playground, so I am wondering if there is another setting, i.e. on the material itself that I am setting which could be contributing to the problem, or some other scene configuration that I am missing or whatever, anyways:

Trying to set a bumpTexture on a material throws an error, with a huge chunk of WebGL code. Screenshot is easiest to see https://www.dropbox.com/s/c9ik0kmwl3zlscj/Screenshot 2017-06-30 15.48.15.png?dl=0

Full error message:

https://gist.github.com/jasonayre/3f5aea25c5e09540f9e00f426211d808

Babylon version in my project (a couple of weeks agoish, maybe a few weeks ago?)

babylonjs@^3.0.2-beta:
  version "3.0.2-beta"
  resolved "https://registry.yarnpkg.com/babylonjs/-/babylonjs-3.0.2-beta.tgz#a8fef0e6ee32ced2e158f00de6aa740e874f146a"

diffuseTexture with the same asset works fine, bumpTexture blows up, i.e.

    this.plane.babylon.material.bumpTexture = BABYLON.Texture.CreateFromBase64String(this.backgroundNormalMap(), this.background_normal_map_image_key);

   ^throws error
    this.plane.babylon.material.diffuseTexture = BABYLON.Texture.CreateFromBase64String(this.backgroundNormalMap(), this.background_normal_map_image_key);

   ^no error

-- any ideas as to what could be happening here?

Link to comment
Share on other sites

Oh also, at the end of the error which throws the huge WebGL code block there is another error, not sure if this is helps identify or not

client.js:111264 BJS - [16:34:06]: Error: WARNING: 0:81: '
' : extension directive should occur before any non-preprocessor tokens 
ERROR: 0:743: 'NORMALXYSCALE' : unexpected token after conditional expression 
t._ErrorEnabled @ client.js:111264Effect._prepareEffect @ client.js:111274(anonymous function) @ client.js:111274Effect._processShaderConversion @ client.js:111274(anonymous function) @ client.js:111274Effect._processIncludes @ client.js:111274(anonymous function) @ client.js:111274Effect._loadFragmentShader @ client.js:111274(anonymous function) @ client.js:111274Effect._processShaderConversion @ client.js:111274(anonymous function) @ client.js:111274Effect._processIncludes @ client.js:111274(anonymous function) @ client.js:111274Effect._loadVertexShader @ client.js:111274Effect @ client.js:111274n.createEffect @ client.js:111266r.isReadyForSubMesh @ client.js:111277r.render @ client.js:111273t.render @ client.js:111274t.renderUnsorted @ client.js:111270t.render @ client.js:111269t.render @ client.js:111269r._renderForCamera @ client.js:111271r._processSubCameras @ client.js:111271r.render @ client.js:111271(anonymous function) @ client.js:134915n._renderLoop @ client.js:111265
client.js:111264 BJS - [16:34:06]: Trying next fallback.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...