Author Topic: Hexasphere won't work in WebGL?  (Read 222 times)

Qwerku

  • Newbie
  • *
  • Posts: 34
    • View Profile
Hexasphere won't work in WebGL?
« on: May 13, 2019, 11:18:37 AM »
I just tried to color my first hexasphere, and the hexasphere remained pure white instead of turning blue.  I then noticed this in the console:

"Current platform does not support array textures.  Hexasphere shading won't work."

Does that mean I'm out of luck with Hexasphere if I'm building to WebGL?

Thanks,
Qwerku

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Hexasphere won't work in WebGL?
« Reply #1 on: May 13, 2019, 11:27:43 AM »
Hexasphere requires compliance with shader model 3.5 which WebGL 1.0 does not support.
Try enabling WebGL 2.0 in your browser:
https://get.webgl.org/webgl2/enable.html

Qwerku

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Hexasphere won't work in WebGL?
« Reply #2 on: May 13, 2019, 11:33:03 AM »
That's helpful to know, but it's not even working in the editor when I switch over from a PC build, so I haven't even gotten to browser testing yet.  (The hexasphere worked in the editor when I switched back to PC platform)  None of the build settings for WebGL seem to keep that error from being thrown.

Qwerku

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Hexasphere won't work in WebGL?
« Reply #3 on: May 13, 2019, 11:41:27 AM »
I just found the Automatic graphics API setting, which seems to allow me to exclusively build to webgl 2.0.  The hexasphere is still white in the editor, but I'm building now to see if it will work in the browser.

Qwerku

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Hexasphere won't work in WebGL?
« Reply #4 on: May 13, 2019, 12:07:42 PM »
The build succeeded, but my browsers either hang or crash when attempting to run the build.  Not sure if I can figure this out on my own, but this is definitely something I need to get working when I have the time.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Hexasphere won't work in WebGL?
« Reply #5 on: May 13, 2019, 12:33:50 PM »
Yes, you need to increase the WebGL memory in player settings to something like 512K or more, depending on the number of tiles.
Here's a test I just built for you:
https://kronnect.me/test/hexa/

WebGL 2 is required to run the demo. Notice that textures are used but side faces are not shown in extruded tiles because WebGL 2.0 does't support geometry shaders - in this case Hexasphere falls back to shaders that use a displacement for the top face (side faces are not rendered).