We created our own shareders to support Physically Based Rendering in our game, these shaders works well on Windows / OSX / Android / iOS platform, but when I tried to run a HTML5 bundle, there are some error messages in the logs and the game failed to create the 3d scene. Please see below screenshot for more detail.
I checked the shader files, and they looks fine to me. Anyone can help on this?
1 Like
When looking at a wall of errors, I usually start at the top, since I suspect something went wrong at the start, and the rest is errors due to the first error. What are the first errors in the log?
1 Like
For this issue, I am pretty sure the first error message is
WebGL: INVALID_VALUE: shaderSource: string not ASCII
Ok, I was just asking since the file loading seems to fail on the line above, which made me suspicious:
Could you try collapsing the define into one line, like this:
#define spot_world_2_light(p) mat4(spot_light_w2l_c0, spot_light_w2l_c1, spot_light_w2l_c2, spot_light_w2l_c3) * p
3 Likes