Sign in to follow this  
thrice

Bump Map throwing strange WebGL errors in my project

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?

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Well. I had the same issue about ~a week ago, only with 2 imported models and their default materials.

This issue isn't present now, after testing the nightly preview build. So someone must have fixed a mistake along the way :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.