Page 1 of 1

WebGL does not render shaders

PostPosted: Thu Jan 11, 2018 3:37 am
by kevin3d
Hello,

I built a game around a workflow i needed in Amplify Shader. I'm using trim sheets so my meshes all have their 4th UV Sets in use for normal maps. We just tried to create a build for WebGL, but none of my amplify shaders are working with webGL. Can you give any suggestions? I'm not doing anything fancy with the shader. Just plugging in nodes into the "standard shader" you provide that is similar to unity's standard shader.

Most importantly i need my normal maps to work with webGL as i'm using a different set of UVs.

Re: WebGL does not render shaders

PostPosted: Thu Jan 11, 2018 4:31 am
by kevin3d
After playing around with it some. It seems like its functioning.. but only on shader model 3.0. Is there a reason why it wouldn't work on any other one? What would be the downsides of using shader model 3.0? If you have suggestions to get it to work on shader model 4.5 (which seems like the default). I'm happy to try.

Re: WebGL does not render shaders

PostPosted: Thu Jan 11, 2018 10:37 am
by Amplify_Borba
kevin3d wrote:After playing around with it some. It seems like its functioning.. but only on shader model 3.0. Is there a reason why it wouldn't work on any other one? What would be the downsides of using shader model 3.0? If you have suggestions to get it to work on shader model 4.5 (which seems like the default). I'm happy to try.


Hey there kevin3d, even though you can use ASE to create WebGL compatible shaders we can't guarantee that they will work as expected as you may run into version specific Browser or Unity issues.

Since WebGL 2.0 roughly matches OpenGL ES 3.0, shader model 4.5 is not supported since it requires OpenGL ES 3.1 capabilities, as you can confirm on the Unity manual.

While using a lower shader model might have the downsides of supporting less features, limiting the shader instructions you are able to use, it provides higher compatibility for older platforms and devices.

Please let us know if you have any further questions, thanks!