HI all!
I’m focusing on releasing the editor using Babylon.JS v5 but I’m facing an issue since version 5.6.0 that I can’t figure out.
The problem is also that I fail to reproduce it in the playground and that’s a problem!
I reproduced only using the Standard Material
and it looks like it is related to prepass and available uniforms.
Error: FRAGMENT SHADER ERROR: 0:237: 'view' : undeclared identifier
at Engine.ThinEngine._finalizePipelineContext (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:61234)
at Engine._createShaderProgram (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:53573)
at Engine.ThinEngine.createShaderProgram (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:61157)
at Engine.createShaderProgram (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:53546)
at Engine.ThinEngine._preparePipelineContext (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:61282)
at Effect._prepareEffect (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:128047)
at Effect._useFinalCode (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:127743)
at /Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:127685
at /Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:42043
at Function.ShaderProcessor._ProcessIncludes (/Users/julienmoreau-mathis/Desktop/Babylon/Editor/node_modules/babylonjs/babylon.max.js:42387)
With more details, it looks like prepass normal computation uses “view” which is not declared:
Offending line [268] in fragment code: glFragData[PREPASS_NORMAL_INDEX]=vec4((view*vec4(normalW,0.0)).rgb,writeGeometryInfo)
Error: FRAGMENT SHADER ERROR: 0:268: 'view' : undeclared identifier
The only file related to standard material / prepass I see declaring view uniform is: Babylon.js/defaultFragmentDeclaration.fx at master · BabylonJS/Babylon.js · GitHub but the file history doesn’t explain why the problem appears only since 5.6.0
I have checked and the editor performs 0 override/strange thing on the engine
Any help would be awesome
Thanks a lot !