Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help!(Who can help me converting OPENGL ES language to Unity Shader Lab language?)

Discussion in 'Shaders' started by hpl123, Jan 3, 2014.

  1. hpl123

    hpl123

    Joined:
    Jan 19, 2013
    Posts:
    4
    Hello,everybody:)This is my first post in this forum,and my English is not good,don't mind:)
    Go into my question~ I want to make a water in Unity3d for my game,but the built-in water package in Unity can't meet my needs.I test dozons of water packages in Asset Store(water+,Easy Water,Triton Ocean 3D Water,Dynamic Water System,SUIMONO Water System,Triton Ocean 3D Water and so on), but their performance is bad that fps is less than 15 running at Iphone4.Some authors who make the water package in Asset Store tell me to change the resolution of Iphone4 to 320*640,but I need HD.I find a game named "boom beach" in which the water is very beautiful and HD running at Iphone4,that's my need.
    I try to write water shader using OPENGL ES language and implement my effect,but I can't convert it to Unity Shader Lab language for my limited language.Who can help me? Relative files are in the accessory.Thanks in advance:) $QQ图片20140103183958.jpg
     

    Attached Files:

  2. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Any tool that I can try the .vsh and .fsh ?
     
  3. bangquangvn

    bangquangvn

    Joined:
    Aug 19, 2013
    Posts:
    5
    Could you give me example of how to use your GLES shaders?
     
  4. AdBar

    AdBar

    Joined:
    Feb 1, 2014
    Posts:
    17
    If i remember correctly, you just plug in the vsh main function into a v2f function inside a cg fragment shader , then the fsh is going to be the ur frag function, you'll have to remove the macros unless you set them somewhere else, or you would need to create a script that has checkboxes that turns these on and off. Have you tested this shader? Alot of stuff is going on in the frag section, dont know how fast thats going to be on iphone 4. If I have some free time I can try and convert this for you. I havent really went over the shader but shouldn't be too hard to convert it with what I said up there. GL
     
unityunity