Search Unity

Sun Shafts Supported?

Discussion in 'iOS and tvOS' started by poolts, Dec 16, 2012.

  1. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
    I've been reading through the forums and I'm still ensure whether the sun shafts image effects is supported on newer iphones (i.e. 4S and 5).

    I've read that depth textures weren't supported on iPhones and thus the sun shafts image effect was not supported. However, I've also read that "OpenGL ES 2.0, and "depth texture" is supported on iOS (since iOS 4.1, GL_OES_depth_texture is supported" which can be found in this thread: http://forum.unity3d.com/threads/110948-Depth-Textures-support-for-Mobile-(iOS-Android)-platform.

    Also I've read that the isSupported check within the PostProcess script, always returns false (not sure how true this is) for mobile devices, and if you disable this it the effect can work. Although, after trying this I got a lot of flickering on the device.

    So is it supported? If not, are there any alternatives (i.e. a mobile sun shaft shader) ? I know that Shadowgun used some sort of volumetric sun shaft shader, but can't find any references.

    Anyway you be grateful for some insight :D
     
  2. Pixeldamage

    Pixeldamage

    Joined:
    Sep 6, 2010
    Posts:
    52
    I'd like to know about this as well. On my workstation there's actually another issue with the image effect Sun Shafts; it only appears when I switch to Deferred and I can't get it to appear in Forward rendering. By packaging up the scene and trying it on another workstation the problem seems to be solved (they appear even with Forward). I know its not possible to do Deferred on iOS but will Sun Shafts work (on iOS) when built in Fwd mode?
     
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    I seem to remember when i downloaded the sample shadowgun level the sunshafts were sprites. Might be wrong though as it was a while ago.
     
  4. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
    Yeah just had a look at the shadowrun article, and I think they're just sprites with a transparent cutoff shader.

    Funny, enough I've got the sun shafts shader to render on the iPhone 4S, but it seems to be taking some depth information and culling the rays that hit geometry. Although, it's flickering like mad!