Search Unity

Weird graphical issue when exporting to WebGL

Discussion in 'WebGL' started by Onizuka101, Jul 10, 2015.

  1. Onizuka101

    Onizuka101

    Joined:
    Jul 10, 2015
    Posts:
    6
    Hello everyone,
    I made a game for the web player in Unity 4.6, I then upgraded to unity 5.1.1.f1, both were the free version of unity. The game works fine in all his aspects when I export for the Unity web player but I get weird graphical errors when I export to WebGL:

    WebPlayer


    WebGL


    the only change I made here is switch the platform, all of the image's parameters are the same. As you can see the WebGL version is squashed. The image is 4096x2445 while the game window itself is 960x600 I use that image as a world map and the ship navigates through it. This problem only comes up when I build for WebGL

    The other problem are the particles

    WebPlayer


    WebGL


    I tried reading up on the forum but I have not found anything useful. I doubt there is anything wrong with my game since it has no problem whats so ever on the web player. I know the WebGL export is still in preview state so could this be some kind of bug or are there some special settings I need to make for the WebGL export, I left all the player settings at default when exporting. Thank you
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    It looks to me like your aspect ratio's are different, that will impact the width/height ratio of the camera and therefore change what it sees.
     
  3. Onizuka101

    Onizuka101

    Joined:
    Jul 10, 2015
    Posts:
    6
    The resolution size of the build is the same for both the web player and the WebGL plus I have more than 20 backgrounds in this game and that is the only image that gives me this problem. Im beginning to think that the problem is the size of the image maybe, this is the only 4096 image Im using in the game
     
  4. Onizuka101

    Onizuka101

    Joined:
    Jul 10, 2015
    Posts:
    6
    Can some one help me with this? I'm hardly an expert by I know my way around Unity pretty well, but this really leaves me stumped
     
  5. Onizuka101

    Onizuka101

    Joined:
    Jul 10, 2015
    Posts:
    6
    Ok so it seems that the particle system problem is cause by the shader I'm using, I'm using particles / alphablend premultipied, when I switch this to a normal unity 5 shader it works when I build, but I cant get the look I want we the normal shader, is this a limitation to webgl?
     
  6. Onizuka101

    Onizuka101

    Joined:
    Jul 10, 2015
    Posts:
    6
    Can I maybe can an opinion from a unity specialist, thank you
     
  7. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Are you still experiencing these issues? Have you tried with Unity 5.2 ?
     
  8. pdenton

    pdenton

    Joined:
    Oct 13, 2015
    Posts:
    1
    As for the images - I had a very similar problem with WebGL and found out that it was caused by using Raw Image component (which worked OK in Web Player). After switching to Image component everything works fine.
     
unityunity