Search Unity

Sunshine! - Official Thread

Discussion in 'Assets and Asset Store' started by PolyVector, Aug 1, 2013.

  1. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @cl-apps
    I'm working on getting Sunshine 1.1 submitted today and it has a cleaner version of Mobile Light Scatter (with proper SM3/SM2 fallback)

    Does the iPhone 5 support RenderTextureFormat.Depth? This is currently required for Sunshine's PostProcessing. I know a work-around (using DepthNormals), but in my tests devices that can't do .Depth will perform so poorly with the work-around that it's not worth it.
     
  2. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    The iPhone 5 is pretty powerful it may not be compatible with .depth but might work with your workaround. I'm willing to give it a try if you send it over. You can email chris at cl-apps dot com for further testing and feedback if you wish!
     
  3. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @cl-apps
    I just sent over a preview of version 1.1... Lemme know if that workaround is usable on iPhone 5. :)
     
  4. A-M

    A-M

    Joined:
    Jun 24, 2013
    Posts:
    5
    Was a nearly insta-buy seeing how much problems I had with shadows on Android (some objects not casting shadows if too close to ground, filtering bugs with line-artifacts, all that on a "ground-breaking" Nexus 4). Not disappointed, works as intended, no issue for now.
    I'm also quite amazed that it performs so well without Depth Texture, I had no performance hit (and that with a very high shadow map resolution and 2x2 PCF). (And bonus point for devices not supporting depth texture! How could nVidia even release a chip that does not support them..)
    Only thing missing are shadow cascades on mobile. At least 2 cascades would be nice, for close up and far details (The game map being quite vast..)

    Can only recommend!
     
  5. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @A.M.
    Thanks for the kind words!

    Technically, there's nothing preventing Cascades on Mobile. I just was trying to aggressively optimize the Mobile shaders and decided that it was worth it to save a few instructions. If there's a demand for it I'll look into Cascades on Mobile for a future release. :)
     
  6. A-M

    A-M

    Joined:
    Jun 24, 2013
    Posts:
    5
    You could possibly play with some ifdefs to define Quality vs Performance profiles (I believe, I'm no shader expert, all I can do is messing around in Shadertoy with raymarching and some sin/cos waves, haha...).
    But just a tip I've learned the hard way: always think ahead when you develop something, newer mobile phones are actually capable of a lot more than what we think, and we can't ignore these (For instance, the Galaxy S4, one of the most powerful phones on the market, sold over 20 million units!)

    Good luck with future sales and I'm looking forward for mobile cascades!
     
  7. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I'll definitely add it to my todo list. :)
     
  8. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Version 1.2 has been submitted to the Asset Store!

    Why was version 1.1 skipped you ask? Well, I may have been a little over-zealous when preparing the submission, that's where!

    The version number doesn't matter, but the changelog does!:

    * Added Mobile Light Scattering! Device must support RenderTextureFormat.Depth.
    * Improved Camera.depthTextureMode autodetection. Light Scatter can simply reuse whatever format you're using. Recycle, reduce, reuse!
    * Updated Documentation.
    * Removed "Background" support in Shadow Caster Shader. This eliminates potential fill-waste.
    * Fixed Shadow Caster allowing >1.0 depth... Light Scatter is now much more stable!
    * Fixed Install/Uninstall out of memory crash! *facepalm*
    * Fixed Readme comments in Shader Sample... #pragma multi_compile cannot contain comments on the same line!
    * Now checking IsOpenForEdit() when Installing/Uninstalling.


    I'll post again when it's accepted to the Asset Store! Thanks for all the feedback everyone!
     
  9. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    98
    Hi PolyVector mainly any Advanced SS shader with Ramp lighting :)

     
  10. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    In the doc it is said: "For more real-world examples (such as non-surface shaders), browse through the Sunshine/Shaders folder."
    Can you please be more precise and give an example of using the sunshine with non-surface shader
     
  11. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    I guess I can access sunshine in ForwardBase pass and access generic point lights in ForwadAdd pass. This way I can mix sunshine with anything I want for the point lights\additional direct lights.

    I need two functions to access in ForwardBase Pass something for shadow_attenuation and something for the light_scatter. Also if it is possible then I believe it is possible to switch to the deffered mode in render settings and have access to the soft particles, etc... But what do I need for the shadow custer shader?
     
  12. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    Also if there is any possibility to use sunshine with soft shadows, even when my light is set to soft shadows with maxed softness I still recive sharp as knife shadows=)
     
  13. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Alexey
    Deferred Rendering is not supported at all by Sunshine, it is only a Forward rendered solution.

    The softness is controlled by your Sunshine Prefab's "Shadow Filter" setting. PCF 4x4 is the softest.

    If it still looks hard, you might have your Shadow Resolution set too high for the distance you're covering, or possibly be using more Cascades than you require.

    I'll try to put together a sample of a non-surface shader using Sunshine for you. Although if you're trying to implement shadows, additive lights, etc I would recommend just using a Surface shader for simplicity. :)
     
  14. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    I have already my shaders done as non-surface, because I'm aiming at non photorealistic image and most interested in sunshine for its amazing volumetric scattering.

    Also could you please explain the forward rendering limitation. It is ok to have sunshine for only one direct light, but why can't I calculate default shadows for the point lights. I can access point light shadows in ForwardAdd pass even when my project set to forward rendering mode and already done those in the project with the sunshine. the only thing i need to know now is how to access sunshine results in ForwardBase pass.

    Also why sunshine won't run in deffered rendering mode, even when I only have one direct light and compatible shaders. I know this can lead to a potential problems but is it any possibility to make it run in deffered mode using its data in ForwardBase vertex\fragment shaders? It is really crucial for me to have default point light shadows and softparticles in the project, thus I'm asking.
     
  15. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Alexey
    That makes sense. :)

    The forward rendering requirement is central to how Sunshine was designed. The shadows are calculated as the object is drawn, and not in a "collector" pass or similar. I plan on investigating Deferred support at a later date (no promises that it'll work out), but as it stands it simply isn't possible to use the deferred renderer.

    Built-in shadows should work fine for point lights in a ForwardAdd pass, nothing should change there.

    Here is the simplest example of a Vertex/Fragment shader that I could come up with (It will also be included in a future Sunshine update):
    Code (csharp):
    1. Shader "Sunshine/Examples/VertFrag Example" {
    2.     SubShader {
    3.         Tags { "RenderType" = "Opaque" }
    4.         Pass {
    5.             Tags { "LightMode" = "ForwardBase" }
    6.             CGPROGRAM
    7.             #pragma vertex vert
    8.             #pragma fragment frag
    9.  
    10.             #include "UnityCG.cginc"
    11.  
    12.             #include "../Sunshine.cginc"
    13.             #pragma multi_compile SUNSHINE_DISABLED SUNSHINE_FILTER_PCF_4x4 SUNSHINE_FILTER_PCF_3x3 SUNSHINE_FILTER_PCF_2x2 SUNSHINE_FILTER_HARD
    14.  
    15.             // Require SM 3.0 on Desktop platforms:
    16.             #pragma target 3.0
    17.            
    18.  
    19.             struct vertOut {
    20.                 float4 pos:SV_POSITION;
    21.                
    22.                 // Required Sunshine Params:
    23.                 SUNSHINE_INPUT_PARAMS;             
    24.             };
    25.  
    26.             vertOut vert(appdata_base v) {
    27.                 vertOut o;
    28.                 o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
    29.                
    30.                 //Write Sunshine Params:
    31.                 SUNSHINE_WRITE_VERTEX(v, o);
    32.                 return o;
    33.             }
    34.  
    35.             fixed4 frag(vertOut i) : COLOR0
    36.             {
    37.                 //Get Sunshine Light Attenuation:
    38.                 //Note: I'll be adding a nicer Macro for this functionality in an update:
    39.                 fixed lightAttenuation = SunshineLightAttenuation(i.sunshine_lightData);
    40.                
    41.                 //This is a simple example, just return the attenuation :)
    42.                 return lightAttenuation;
    43.             }
    44.  
    45.             ENDCG
    46.         }
    47.     }
    48.     Fallback "Diffuse"
    49. }
     
  16. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    Thank you very much!!

    Do you use SunshineLightAttenuation both for shadows and volumetric scattering. I want to try to fade scattering based on distance to camera, thus it will be great to have sepparate control for it.
     
  17. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Scattering is done as a post-process (It can be found in Sunshine/Shaders/Core/Sunshine Post Scatter). There are a lot of Scatter-related settings that affect how it is faded without editing the effect! Exaggeration is probably what you will want to play with. I have it turned up by default to create an over-the-top scatter effect... Turning it all the way down would be much more realistic.

    Edit: I should have mentioned that SunshineLightAttenuation() will also be affected by any Overcast Shadows you are using.
     
  18. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    ok. Thanks , I'll look at it
     
  19. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    I know you did all the best to make this effect uniform for different situations, but i need very specific control due to the visual style and game play of the game. If you plan updating the tool soon, it will be great if you can add some comments to the scatter effect.
    thank you.
     
  20. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Alexey

    I have plans to improve the documentation/comments, but right now I'm focusing on critical bugs and functionality.
     
  21. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    Looks great -- will be buying as soon as support for deferred and (current-gen) mobile-volumetric-shafts are confirmed ;)

    Also is it possible that this works without having to tweak any surface shaders one might use? The deal with Unity's "surface shaders" (there's no such thing in low-level GL or D3D after all) is "no matter your shader code, it'll be compatible with scene lighting and shadows". As a result, a diverse array of various custom shaders abound in the ecosystem. Instead of having to figure out how to tweak each individual custom SS that one might be using (or that might be 3rd-party ones with their own version-update cycles), would be great if Sunshine could figure out a way to afford the same level of compatibility-by-default, by-design ;)
     
  22. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @metaleap
    Mobile Volumetric Scatter is currently waiting for Asset Store approval! They should work on mobile devices that support RenderTextureFormat.Depth (for Camera.depth) and they look great on my Nexus 7 (2012) :)

    The Android APK demo on the website is using the new version, if you have a capable Android device to test with.

    Compatibility-by-Design - Wouldn't that be awesome!? I wasted quite a lot of time and sanity searching for this "holy grail", but it's simply not possible. Unity can do this because they have full control over how the engine generates shaders. In order for Sunshine to do the same, Unity would have to expose some kind of SurfaceShaderPostProcessor with a nice API for manipulating the generated code, and just as importantly it would have to allow processing of built-in shaders. If Sunshine becomes popular, maybe all its users can request that Unity add this feature. :)
     
  23. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Just bought it and tried to run the Sunshine Install script to set for use with my present shaders.
    Unfortunately, Unity runs out of memory and crashes, so not able to get it working in this project.
    Any ideas?
     
    Last edited: Aug 7, 2013
  24. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Don Gray

    This has been fixed in the new release, but it hasn't been accepted to the Asset Store.

    I'll PM you an early copy of the update, sorry about the inconvenience.
     
  25. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Excellent, thanks!
     
  26. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sunshine 1.2 has been accepted into the asset store! Mobile Light Scatter has been added, and it should work on devices which support RenderTextureFormat.Depth!

    If you're still experiencing problems with the Installer running out of memory, PM me with the details (platform, size of your project, etc)... Squashing this bug is a high priority!
     
  27. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    As you know, PolyVector, the new build (1.2.1) installed will no memory issues,
    keeping the memory usage under 1 GB, on an empty scene in my project.
    Will be testing how it works in my project soon!
    Thanks for the great support!

    :)
     
  28. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Don
    I'm so glad this issue is sorted out!

    I'll be submitting 1.2.1 to the Asset Store later this week after I finish a few other changes. :)
     
  29. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    I have some problems... please check the picture and let me know what I can do. I tried everything... if I uncheck Sunshine, everything is fine.
    Apparently it is the shadow cascades that we see... adding more resolution just narrow the space between them.
     

    Attached Files:

  30. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @unity3dx
    This is called "shadow acne", you can increase the Bias on your directional light to reduce the effect.

    To completely eliminate it in this situation I would also recommend not allowing floors/ground to cast shadows, it will have the added benefit of improved performance. You can do this by setting your floor to a layer that is excluded from the "Shadow Casters" option in Sunshine.

    Hope this helps. :)
     
  31. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    ... the problem is not coming from the light source. Even if I select no shadows with the light, I see the same.
    The demo is working fine. But when I use it in my level, big problem.
    The bias changes nothing. Of course I can have this shadow acne effect on the light itself. I can adjust the bias to remove it.
    But the one I am talking about is made by the Sunshine script. I can remove it if I uncheck the Sunshine script. Everything else, and I tried everything, every slider, is not changing anything.
    As for your advice, sure if I remove the shadows from the ground, there is no more artifact... do you have any more advice like these? Because I want to use shadows on the ground, that's why I purchased your asset, having shadows, on the ground!!!
    Give me an FTP and I will upload the project... so far, I get much better result with Unity's shadows and some fx.
     

    Attached Files:

  32. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @unity3dx
    I think I wasn't very clear in my last reply, let me start over. :)

    Acne - This is a common effect caused by a surface "self shadowing". The problem gets worse as the shadow resolution decreases, the shadow distance increases, or the shadow blur size increases. It is the reason shadows have a "Bias" setting, to mitigate this specific issue.

    No Shadows - This won't change anything because Sunshine creates it's own shadows. This setting only affects the built-in shadows.

    Bias - This should have an effect because Sunshine reads this value from the light and adjusts its own Shadow Bias specifically to combat "acne".

    Ground Shadows - I didn't mean to suggest that you remove shadows received by the ground, only that you could prevent the ground from casting shadows. A ground that casts shadows is generally only useful if you have something below it, such as tunnels.

    Potential Solutions:
    * Increasing the Directional Light's "Bias"
    * Increasing Sunshine's "Shadow Resolution"
    * Decreasing the Shadow Distance in Unity's Quality Settings

    I hope this is more clear.
     
  33. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    All your potential solutions have been tested prior posting on this thread.

    I am uploading a project right now so that you can test by yourself. I will send you the link in private.

    The problem comes from the ShadowTermPCF if I lower the *0.11111 multiplier in the return statement or return 0, which null the work of the routine of course, the artifact is gone, but also is gone the shadows.

    I have used FPS realistic prefabs demo scene and Sunshine is working fine... so I think maybe it has something to do with my scene specs?

    I do not use a terrain for the ground but it is all a big mesh with Diffuse.
     
    Last edited: Aug 15, 2013
  34. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @unity3dx

    Demo Project Sunshine weighs in at under 1MB, while the "Sponza" demo you are talking about has over 300MB+ in assets. I didn't feel that including such a huge project, which I probably don't have the rights to redistribute, was a good idea.

    RandomTexCoord() - If you'll look closer, this method isn't actually used, I should probably remove it actually. Since you work with shaders, you must understand that pseudo-randomness is often used because HLSL lacks a good noise() intrinsic. That said, the shadow filtering doesn't use noise or random values.

    ShadowTermPCF - Shadow acne is created in these functions, simply because the shadows are calculated there. The Shadow Bias affects the way the ShadowMap is generated, which in turn affects what ShadowTermPCF reads. Obviously, the bias is not enough to help your situation, but that is the purpose.

    0.11111 - Obviously this isn't a constant you should edit, but you know that. You are seeing a change, because you are effectively truncating the penumbra. This "works" because you are decreasing the filter kernel (size). You would see similar benefits by changing the Shadow Filter to Hard or PCF2x2.

    I haven't received your private message yet, but I should have time to look at your demo tomorrow and see what's going on.

    We'll get this sorted out. :)
     
  35. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Before I head to bed, a potential issue your project might have that's hindering the "Bias" setting is scale... If your project uses very tiny units, like 100 units = 1 meter, this could make Bias ineffective.

    I recommend 1 unit = 1 meter personally, since it plays nicely with physics, and has good numeric stability in most situations. :)
     
  36. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    I am in Asia, it is the day here. The file takes some time to upload. I think it has something to do with something specific to my scene.
    I have tested Sunshine with other scenes and it is working fine...
    The spec with this scene is that there is no terrain, the ground and everything is a mesh with a diffuse texture.
    I loaded Sunshine with 2 other scene and it was working right from the box...
     
  37. yankijp

    yankijp

    Joined:
    Dec 10, 2012
    Posts:
    12
    Heya!,

    How does the shadow distance correlate between desktop and android? On desktop I pulled in my shadow distance fairly close and I like how my hard shadows look with it set to medium res when I hit play. On android when it is built the shadow distance settings look different.

    Thanks!
     
  38. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    Ok I think I have found the issue. The problem comes from the Overcast option.
    Actually if I change the overcast texture with a smooth dark one, the problem is gone and it looks beautiful.

    Here are 2 screenshots. Check the overcast texture I use. If I use the blank one you provide, you immediately see the artifact on the floor. You can check in the project I sent you in private.

    Apart from that, when it is fixed, the result is pretty impressive. Specially with the transparent textures that are now doing correct shadows!:razz:
     

    Attached Files:

    Last edited: Aug 15, 2013
  39. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    That's interesting that the Overcast would affect it. I came up with an entirely different solution to the problem. It seemed to stem from the scene being Scaled 3x... There is a bug I just tracked down in the way "Sunshine Shadow Caster.shader" calculates the Shadow Bias

    The following line needs to be changed from:
    To:
    This fix will be included in the next version I submit to the Asset Store. The next update you see has already been submitted, so that won't include the fix.

    Edit: I also noticed an unrelated bug that was distorting Overcast Shadows when using 2 Cascades... This is fixed as well for the next submission. ;)
     
    Last edited: Aug 15, 2013
  40. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @yankijp

    I just noticed your question, oops!

    The only difference that should happen between platforms is that multiple cascades is allowed on desktop, but not on mobile. This shouldn't affect the shadow distance though.

    I'll look into this and see if there's any potential bugs.
     
  41. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @yankijp
    I couldn't find any issues. Perhaps you are comparing the shadows in the editor to shadows at runtime. Sunshine only works at runtime, because it doesn't have sufficient access to the Editor's Scene Camera...

    If you are talking about a relatively small change in shadow distance (under 10%), then it is almost certainly the difference between built-in and Sunshine shadows.

    Sunshine calculates the shadow's distance radially, to ensure perfect stability when rotating a camera (like in an FPS). Unity takes a different approach by maximizing the shadow distance at the expense of consistency. They are both different approaches by design, so you might simply have to extend you shadow's distance by a few units for Sunshine.
     
  42. yankijp

    yankijp

    Joined:
    Dec 10, 2012
    Posts:
    12
    Heya,

    Actually the change was between the runtime sunshine shadows in the game view on my desktop and when I build to android on my Ouya. I have the shadow distance as a test relatively low (like 3). On the desktop it seems like it is higher res (it is set to the default of medium res). Also as a part of my test the shadow is partially clipped. On the Ouya it looks lower res and the shadow isn't clipped.

    I am just trying to bring in my shadow distance to have a higher res shadow on my main character only with out actually setting the shadow resolution setting on the Sunshine prefab to high and losing more fps.

    Thanks!
     
  43. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @yankijp

    Okay, that makes sense!

    The resolution difference you're experiencing is because Sunshine mimics Unity's shadow resolution calculation, which is adjusted based on screen resolution, and available video memory.

    When you say partially clipped, do you mean that the shadows look like the "Shadow Camera" is inside the player/objects? If this is the case, you can adjust the "Shadow Padding Z" slider in "Advanced Shadow Settings". I really need to add that to the documentation! :)

    If that's not what you mean, could you post a screenie so I can see what you're seeing?
     
  44. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I should let everyone know that Sunshine 1.2.1 was just accepted to the Asset Store! I'm already hard at work on the next release, so stay tuned. ;)
     
  45. yankijp

    yankijp

    Joined:
    Dec 10, 2012
    Posts:
    12
    $shadow.png

    So the clipping from bringing the shadow plane too close was just a test. Since you said it has to do with the screen resolution I set the game window to 720p. The Ouya shadow is all blocky and I see the whole texture. I will try bringing it further in but if you have any other advice it would be cool. Otherwise Ill have to lose some FPS upping the res in the prefab.

    Thanks! :)
     
  46. unity3dx

    unity3dx

    Joined:
    Apr 15, 2011
    Posts:
    175
    Thanks Polyvector for the quick fix... I am amazeballed!
    I must say that the visual result is jaw dropping.

    It seems that some shaders does not have your includes like the Tree Generator Leaves Fast... when I use this shaders the objects seems to not be affected by the light and shadows. I swiched to a cutout shader and it worked. I think it is just an include missing issue.

    Keep up the good work on this pack, it is very good!
     
  47. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @yankijp
    That is an extreme difference, much more than I would have expected. Hrmmm:

    Shadow Distance - You did mention the distance being different. If you go into Edit->Project Settings->Quality you might check that Android's default configuration doesn't have a farther Shadow Distance than the Desktop's. Sunshine uses QualitySettings whenever possible to match the built-in shadows.

    Cascades - In Edit->Project Settings->Quality again, if the desktop version is using multiple cascades, then since the Ouya can only run a single cascade, it will effectively be much lower resolution.

    Future Plans - I had considered allowing a special "Shadow Volume" option that would allow you to place a sphere around a main character, so that shadows ONLY cover them... This would make optimal use of shadow resolution in the event you only need a main character shadow. If that's something you'd be interested in, I'll jot it down in my TODO list. :)

    @unity3dx
    Have you tried re-importing the tree model? Sunshine's Material processor doesn't currently find generated materials like those from the Tree Creator, but it does when the tree is imported. If you try that and it still doesn't work, I'll look at the shader and see if I messed something up. ;)
     
  48. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    Hi
    sunshine and soft particles doesn't work together in my project.
    It is possible to use soft particles in Forward Rendering if the depth texture for the camera is calculed.

    I use very simple script on camera to do it:
    void Update()
    {
    Camera.main.depthTextureMode = DepthTextureMode.Depth;
    //depthPower = Mathf.Clamp(depthPower, 0, 5);
    }


    It works nice when sunshine camera script is disabled, but as soon as I enable sunshine script it seem to overide something and particles doesn't look soft anymore..
     
  49. Alexey Andreev

    Alexey Andreev

    Joined:
    Aug 5, 2013
    Posts:
    17
    By the way is there any news on deferred rendering suport?
     
  50. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    @Alexey

    Soft Particles - These shouldn't be affected, but I must admit I hadn't thought of testing them. I'll be sure to look into this. If you PM me a small project that reproduces the problem, it'll help me track down any issues faster.

    Deferred Support - Light Scatter for Deferred should be coming in the next release! Shadows/Overcast will remain Forward-only, since I have yet to find a Deferred approach that works in Unity.

    The plus side for some users is Sunshine shadows will no longer be a requirement for Light Scatter... so if you're happy with the built-in shadows, you can add Scatter with basically no effort. This might interest people using a ton of custom shaders, who don't want the hassle of having to make them all Sunshine-compliant. ;)

    Edit: Regarding soft particles, make sure you're using the newest version of Sunshine, since there was a recent update... I don't know that any of the changes would affect particles, but who knows. ;)
     
    Last edited: Aug 16, 2013