PSM and shaders

Discussion in 'PSM Development' started by xixgames, Apr 8, 2014.

  1. xixgames

    xixgames

    Member

    Joined:
    Jan 20, 2014
    Messages:
    28
    Looks like PSM SDK and Vita gpu works like Samsung devices with shaders, no?:rolleyes:
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Messages:
    10,929
    Avoid fixed function shaders.
  3. xixgames

    xixgames

    Member

    Joined:
    Jan 20, 2014
    Messages:
    28
    can you extend this info please?
  4. jesusluvsyooh

    jesusluvsyooh

    Member

    Joined:
    Jan 10, 2012
    Messages:
    239
    Does this mean the default unity and unity mobile shaders will be fine, cannot test on my vita yet, but majority of my shaders are of those. :p
  5. xixgames

    xixgames

    Member

    Joined:
    Jan 20, 2014
    Messages:
    28
    I have changed all the Mobile/Unlit (lightmap supported) shader with Legacy/Self illum, Diffuse and it is working fine, no glitches in the textures and frame rate is ok (150FPS average!), but in some levels I cant use any shader like Vertex or Transparent with CutOff...due to an ambient light error in the shader program at runtime that i dont know how to handle, since, it works in other scenes with same shaders set...
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Messages:
    10,929
  7. sama.van

    sama.van

    Member

    Joined:
    Jun 2, 2009
    Messages:
    1,300
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Messages:
    10,929
    Hi,

    That shader is fixed function.

    Echologin shaders in my sig are all vita compatible, as are any which contain a valid surface shader, or CGPROGRAM block (vert frag). If any Echologin shaders do not work (I'd be very surprised) I'll work with the author and get them fixed within a day.
  9. sama.van

    sama.van

    Member

    Joined:
    Jun 2, 2009
    Messages:
    1,300
    Outch T__T! Sad...:cry:
    Thank you....
  10. xixgames

    xixgames

    Member

    Joined:
    Jan 20, 2014
    Messages:
    28
    Thanks, where can I found fixes for the shaders already?, I dislike to reinvent the wheel :)

    * Mobile Unlit shader with lightmap support
    * Vertex shaders
    * Unlit Transparent shaders
  11. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Messages:
    560
    That is incorrect - fixed function 'shaders' do work just fine with Unity-for-PSM - they are emulated at runtime exactly as they are on Android/iOS when using GLES 2.0.

    The problem with the fixed function shader sama.van referenced is that the emulation code (incorrectly) assumes lerp can be used with mismatching params. I've made a note of this issue and hopefully it will be fixed in the next version.
  12. xixgames

    xixgames

    Member

    Joined:
    Jan 20, 2014
    Messages:
    28
    Thanks eriQue, hope this is fixed in the next version!
  13. al57

    al57

    Member

    Joined:
    Feb 13, 2014
    Messages:
    6
    Hi folks,

    Any idea why Shadow blob projector didn't work on Vita ?

    I think is a shader issue, but my shader skill is near absolute 0 :(

    Thanks
  14. KheltonHeadley

    KheltonHeadley

    Member

    Joined:
    Oct 19, 2010
    Messages:
    1,648
    Thanks Rob(hippo), helped a bunch!
    UnitySaskatoon likes this.