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
    Sunshine's shadows can only replace the built-in, there's no real way to combine the cloud shadow portion of Sunshine with the built-in shadow system unfortunately.

    I do test Sunshine with Orthographic cameras and it should work with Forward/Deferred/Prepass renderers. If it's not working perhaps there's a bug we can track down, let me know.

    Regarding multiple Directional lights, if you look in the Sunshine documentation under Deferred->Caveats there is an explanation of this limitation:

    Hope this helps.
     
  2. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.6.6 is Now Available in the Unity Asset Store
    • Fixed compilation and cascade issues with "#pragma glsl" shaders.
     
  3. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.6.7 is Now Available in the Unity Asset Store
    • Padding Z now works when using Custom Bounds
    • Reduced .transform usage to cut back on external calls
     
  4. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    It is really good but decrease my FPS from 64 to 33! why?
     
  5. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Every game is so different, that's a fairly complicated question. Being vertex or pixel bound, Sunshine's quality settings, the platform/chipset, which version of Unity, the particulars of the scene, these all matter.

    Some suggestions off the top of my head
    • Working with vsync disabled is a really good idea, since it will effectively quantize to 60fps, 30fps, 15fps, etc. Using it in a final game is fine of course, but it can really throw you off when you're working.
    • Scatter can be expensive at high resolutions, so limiting the quality/resolution can really affect performance. I think I remember you saying you're using a lot of ImageEffects, so you may very well be pixel-bound.
    • Reducing the number of cascades and lightmap resolution (in Sunshine, not Quality Settings) can often improve performance
    • Unity's Profiler window, and the new Frame Debugger in Unity 5 are incredibly useful for tracking down performance bottlenecks.
    I hope this helps.
     
    ksam2 likes this.
  6. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    i'm using a shader called CORE framework, it really improves the fps of my game but unfortunately,sunshine doesn't support the shaders :(
     
  7. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sunshine is actually designed to work with vert/frag shaders, but it requires a bit more work to integrate than a surface shader. Take a look at the sample shaders included with Sunshine, there is a very minimalist vert/frag shader.
     
  8. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    so there's no way to make it work?
     
  9. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Not without making the appropriate changes to the Core shaders.
     
  10. chuckyluv869

    chuckyluv869

    Joined:
    Sep 25, 2013
    Posts:
    51
    I've just purchased Sunshine a few days ago and have been playing with it a bit. I've got it to look good in my Game window in the editor but when I do a build of the scene none of the Sunshine components seem to be present. No fog or volumetric lighting, etc... What could be causing this?
     
  11. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Since you have it working, the most likely cause is that you are using Prepass or Deferred rendering and your project contains another asset which replaces the built-in shaders. What can happen is Unity selects Sunshine's replacement in the Editor, and a different one in Standalone.

    If you are using Unity 5, you can manually select the replacement shaders you wish to use in Edit-Project Settings->Graphics.

    If you are using Unity 4, you will probably need to remove the extra replacement shaders from your project (and they will be named something like):
    Internal-PrePassLighting.shader
    Internal-DeferredShading.shader


    The Editor may require a restart.

    If this doesn't help, feel free to send me a small project which reproduces the issue and I'll investigate further.
     
  12. chuckyluv869

    chuckyluv869

    Joined:
    Sep 25, 2013
    Posts:
    51
    I'm a pretty new at this... I'm using a Forward Renderer. If I use a Deferred Renderer it blacks out some of my textures in my terrain. I won't be able to send you a project... I'm working on a deadline and my project files are huge. It'll take me too long to create or modify a project to get to you. And there weren't any shaders with those names in the project other than the Sunshine shaders.

    Also, speaking of terrain, I'm not able to get most of the trees working. I've tried to replace (even manually) the shaders and when I use the Sunshine shaders the leaves on the tree disappear until I get within about a dozen meters of the tree. And even when using those shaders, no volumetric lighting is happening from the trees. These trees are trees generated through the tree generator. Tree models (the same one's the tree generator references) work fine with non-sunshine shaders when placed directly into the scene.
     
  13. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    There are a number of integration issues with Sunshine/Terrain/Trees. A big problem is that the Terrain system treats Sunshine's shadow casting camera as a "regular camera", so it calculates LOD/Grass/Tree distance from that point, instead of the main camera. Unity handles its own Shadow system specially, but doesn't make provisions for 3rd party shadows.

    That said, here are some thoughts:

    • Fine tuning Sunshine's "Padding Z" Setting can help with some shadow casting issues.
    • Try setting up the Tree's Bark/Leaves materials to use Sunshine shaders before applying them to the Tree
    • Using Sunshine's "Install Forward Shaders" option can automatically replace tree material shaders as they are edited/imported
    • Reimporting trees can help if you have "Install Forward Shaders" enabled
    • Placing Trees manually instead of with the Terrain system can help for smaller scenes. There are less issues with standard Tree Creator Trees than the variants the Terrain system generates.

    In all honesty, Sunshine with Forward rendering isn't very "plug n play", and it often requires a fair bit of massaging to get just right, especially with the terrain system. It's not something I would throw together last minute on a tight schedule.

    Without a small project, or more information all I can do is make guesses. I can't seem to reproduce the black terrain issue, but there are so many Unity versions/configuration/platforms to consider. I can offer you a refund if you PM me, but without a project to see what you're seeing it's hard for me to help/debug any further.
     
  14. chuckyluv869

    chuckyluv869

    Joined:
    Sep 25, 2013
    Posts:
    51
    Hey Poly, I plugged away at it and found the issue. There was another camera with different rendering settings buried in a prefab. When I removed that camera all worked well. Thanks for all your help!
     
  15. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Oh that's good to hear, I never would have guessed a second camera would be the culprit!
     
  16. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I have a scene that is inside a cube I created in 3dsMax with the normals flipped inward. There are holes on the top of the cube to let light in. Shadows and lightmapping work fine, but sunshine shines right through. Is there a way to get sunshine to work in this situation? I could obviously use another box, but it's pretty hi-poly and i'd rather not. Please advise, thanks.
     
  17. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    You'll need to turn backface culling off for the appropriate RenderType(s) in "Sunshine Occluder.shader". This can potentially impact performance if you are pixel-bound, so you may want to compare performance before/after to make sure it's not a problem in your particular scene.

    Here's an example for the "Opaque" RenderType:
    Code (csharp):
    1.  
    2.     SubShader
    3.      {
    4.        Tags { "RenderType" = "Opaque" }
    5.        Pass
    6.       {
    7.          Cull Off // ==== Disable Backface Culling ====
    8.          CGPROGRAM
    9.            #pragma vertex vert
    10.            #pragma fragment opaqueFrag
    11.          ENDCG
    12.       }
    13.      }
     
  18. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Hey PolyVector. I've just started implementing Sunshine into my project. I'm getting some crazy performance drops from it, specifically SunShineCamera.OnPreCull(). Looking into the profiler, you look like you're rendering the entire scene, meaning my render time is getting doubled here. Any suggestions as to ways to get around this?
     
  19. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    What you're seeing in OnPreCull() is the scene being rendered into the lightmap (for shadows and/or scatter) which is a unavoidable step. It sounds like you might be using built-in shadows and Sunshine's scatter, each of which creates their own lightmap which can negatively impact performance. Ideally, Sunshine would reuse the built-in shadowmaps for scatter, but since Unity doesn't (currently) allow this, you may want to consider switching to Sunshine's shadows so that both shadows and scatter share a lightmap. This is actually the reason I include a custom shadowmapping system. The switch is relatively straightforward if you are using Deferred/Prepass rendering, but does require a bit of effort (see docs) if you use Forward rendering.

    Just as a general performance tip, make sure you use as few Cascades as needed for your scene, and as low lightmap resolution as possible.

    I hope this helps.
    -Oren
     
  20. Ceraph

    Ceraph

    Joined:
    May 16, 2013
    Posts:
    19
    Hello,

    I just bought Sunshine! and it looks great! My only issue is in trying to get the piggybacking on the vertex modifier to work. I have included the piggyback version of the sunshine vertex modifier after my existing vertex modifier, but I keep getting compile errors on the line I call SUNSHINE_SURFACE_VERT_PIGGYBACK.

    when I try:
    SUNSHINE_SURFACE_VERT_PIGGYBACK(Input, vert)

    I get the error:
    Shader error in 'Sunshine/Greedy Mesh/Tiling': too few parameters in function call at line 89

    when I try:
    SUNSHINE_SURFACE_VERT_PIGGYBACK(vert, Input)

    I get the error:
    Shader error in 'Sunshine/Greedy Mesh/Tiling': Syntax error at line 89

    Any help you could provide in solving this would be greatly appreciated!
    Thanks,
    ~ Ceraph

    below is what my shader looks like:

    Code (CSharp):
    1. Shader "Sunshine/Greedy Mesh/Tiling" {
    2.    Properties {
    3.      _Color ("Main Color", Color) = (1,1,1,1)
    4.      _MainTex ("Base (RGB)", 2D) = "white" {}
    5.      _Occlusion ("Occlusion Strength", Range(0,1)) = .5
    6.      _TexPerRow ("Textures Per Row", Int) = 8
    7.    }
    8.  
    9.    SubShader {
    10.      Tags { "RenderType"="Opaque" }
    11.      AlphaTest Greater .5
    12.      LOD 150
    13.    
    14.      CGPROGRAM
    15.      // Include Sunshine functionality:
    16.      #include "Assets/Sunshine/Shaders/Sunshine.cginc"
    17.    
    18.      // Multi-compile for different filters:
    19.      #pragma multi_compile SUNSHINE_DISABLED SUNSHINE_FILTER_PCF_4x4 SUNSHINE_FILTER_PCF_3x3 SUNSHINE_FILTER_PCF_2x2 SUNSHINE_FILTER_HARD
    20.    
    21.      // Require SM 3.0 on Desktop platforms:
    22.      #pragma target 3.0
    23.    
    24.      // Use the sunshine_surf_vert modifier, and exclude prepass to cut waste.
    25.      #pragma surface surf Lambert vertex:sunshine_surf_vert exclude_path:prepass
    26.    
    27.      sampler2D _MainTex;
    28.      fixed4 _Color;
    29.      fixed _Occlusion;
    30.      fixed _TexPerRow;
    31.    
    32.      struct Input {
    33.        float2 uv_MainTex;
    34.        fixed2 tilingFaceNumber;
    35.        float3 vertColor;
    36.        float3 orientedWorldPos;
    37.      
    38.        // Required Sunshine Params:
    39.        SUNSHINE_INPUT_PARAMS;
    40.      };
    41.    
    42.      void vert (inout appdata_full v, out Input o) {
    43.        UNITY_INITIALIZE_OUTPUT(Input, o);
    44.      
    45.        // Ambient occlusion application
    46.        fixed4 c = v.color;
    47.        c.a = 1 - (1-c.a)*(1-c.a);
    48.        o.vertColor = c * ( c.a * _Occlusion + 1 - _Occlusion );
    49.      
    50.        // World coordinates oriented based on facing direction
    51.        float3 world = mul(_Object2World, v.vertex).xyz + .5f;
    52.        fixed shouldTile = v.texcoord1.x;
    53.        if ( shouldTile != 0 )
    54.        {
    55.          fixed tilingFaceNum = floor( v.texcoord1.y + .5f );
    56.          if ( tilingFaceNum == 0 )
    57.          {
    58.            world = world.zyx;
    59.          }
    60.          else if ( tilingFaceNum == 1 )
    61.          {
    62.            world = world.xzy;
    63.          }
    64.          else if ( tilingFaceNum == 2 )
    65.          {
    66.            world = float3( -1 * world.x, world.y, world.z );
    67.          }
    68.          else if ( tilingFaceNum == 3 )
    69.          {
    70.            world = float3( -1 * world.z, world.y, world.x );
    71.          }
    72.          else if ( tilingFaceNum == 4 )
    73.          {
    74.            world = float3( world.x, -1 * world.z, world.y );
    75.          }
    76.          else
    77.          {
    78.            world = world.xyz;
    79.          }
    80.        }
    81.      
    82. //       SUNSHINE_WRITE_SURF_VERTEX(v, o);
    83.      
    84.        o.orientedWorldPos = world;
    85.        o.tilingFaceNumber = v.texcoord1.xy;
    86.      }
    87.    
    88.      // Generates sunshine_surf_vert modifier:
    89.      SUNSHINE_SURFACE_VERT_PIGGYBACK(Input, vert)
    90.    
    91.      void surf (Input IN, inout SurfaceOutput o) {
    92.      
    93.        float3 world = IN.orientedWorldPos;
    94.        world = world - floor( world );
    95.      
    96.        float tile = IN.tilingFaceNumber.x;
    97.        half2 tex;
    98.        if ( tile == 0 )
    99.        {
    100.          tex = IN.uv_MainTex.xy;
    101.        }
    102.        else
    103.        {
    104.          tex = world.xy;
    105.          tex = ( tex + IN.uv_MainTex.xy ) / _TexPerRow;
    106.        }
    107.      
    108.        fixed4 c = tex2D(_MainTex, tex) * _Color;
    109.        o.Albedo = c.rgb * IN.vertColor;
    110.        o.Alpha = c.a;
    111.      }
    112.      ENDCG
    113.    }
    114.  
    115.    Fallback "Custom/Greedy Mesh/Tiling"
    116. }
     
  21. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It appears that Sunshine is assuming your vert() function only accepts a single parameter, while you're utilizing a second. I'll have to add a new 2-parameter macro in the next release to address this, but in the meantime you can edit Sunshine.cginc to support your second parameter:
    Code (csharp):
    1. //Near the very bottom of Sunshine.cginc:
    2. #define SUNSHINE_SURFACE_VERT_PIGGYBACK(input_struct, piggy_vert) void sunshine_surf_vert (inout appdata_full v, out input_struct o) { SUNSHINE_INITIALIZE_OUTPUT(input_struct, o); piggy_vert(v, o); SUNSHINE_WRITE_SURF_VERTEX(v, o); }
    You will have to right-click and reimport your shader for the change to take effect.

    Hope this helps! :)
     
  22. Ceraph

    Ceraph

    Joined:
    May 16, 2013
    Posts:
    19
    That did the trick, thank you so much for your quick reply!
     
  23. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    Firstly, Sunshine is awesome in so many ways! I'm glad I purchased! That said, I'm attempting to port a project to Unity5 RC1, has anyone gotten sunshine shadows to work with the new U5 standard shader?
     
  24. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    Hello All!

    I am trying to use SunShine, but I am getting the Material Pink. This only happens if I import SunShine into a existing project that I am working on. Using it with a new project works fine.

    I'm open to suggestions on where to start looking.

    Thanks!
     
  25. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Our plan was to include the new Standard Shader when Unity 5 hits final, but seeing as it's in RC now, I took a quick stab at converting it. It required special attention because it's a pretty complicated shader.

    Here's a link to download it

    Sunshine has to be in the project's Assets folder for the shaders to compile. If you're placing it in another folder like "3rd party stuff/Sunshine/" the shaders won't be able to compile and you'll get Pink materials.

    The proper path would be "PathToYourProject/Assets/Sunshine/"

    If you move it, you'll also have to reimport all the shaders, or simply the Sunshine folder.

    If that doesn't help, I'd have to know more about your project (Unity version, renderer, other assets), ideally if you could create a small project that reproduces the issue and PM it to me, I could track down the cause very quickly.

    Hope this helps.
     
  26. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    Yes, I had it in a "Third Party Tools". I deleted the Sunshine directory, re download it and left it in the "Assets" folder and all is well.

    Thanks!

    P.S.
    It would help me for organization if I can move it to a Third Party Tools please.
     
  27. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Glad it worked! I actuality organize that way too, so I sympathize, but sadly there was too much confusion over relative shader include paths... Lots of "../../../" that I couldn't help users with without seeing the project structure.
     
  28. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    Whoa, thanks for the interim converted standard shader!! Awesome support. Sunshine is a must-have!
     
  29. Rycons

    Rycons

    Joined:
    Nov 23, 2013
    Posts:
    31
    Hey PolyVector,

    I am currently making use of Sunshine in my scene and I have a problem with shadows not rendering on the terrain. This issue is only specific to the built in terrain shader since on the default standard shader everything seems to be working as intended.

    Unity5 RC2, DX11, deferred rendering and the built in standard terrain shader:
    https://www.dropbox.com/s/yr4kd86mgiygz4v/Screenshot 2015-02-23 00.24.58.png?dl=0

    I have also tried using the shaders that you recently uploaded but it compiled with the error below.

    "undeclared identifier 'UnityStandardGlobalIllumination'
    Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF SUNSHINE_DISABLED"

    Can you kindly look into this? Thanks!
     
    Last edited: Feb 23, 2015
  30. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It looks like the new Terrain shaders were rewritten to use the UnityStandardShader system, which we haven't included yet in the Sunshine release. We plan on including more Unity 5 specific shaders pre-converted once it hits final which I think will be relatively soon.
     
  31. Rycons

    Rycons

    Joined:
    Nov 23, 2013
    Posts:
    31
    Thank you very much for your reply.

    Will look forward to using sunshine when unity hits final.
     
  32. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    I'm guessing it's still going to be a couple weeks or more before final hits. BTW have you tested shadow performance with Unity 5, especially your OUYA demo? I'm curious to hear if you see noticeable improvements
     
  33. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sorry for the late reply, didn't see this one. No, we haven't compared performance in Unity 4/5 yet. I have noticed that Unity's built-in shadows have improved substantially, but I believe they still don't support Tegra 3 device.
     
  34. Ceraph

    Ceraph

    Joined:
    May 16, 2013
    Posts:
    19
    Hello, I'm having a bit of a performance issue with Volumetric Scattering that I was hoping you could help clear up. Sunshine seems to work great when I have a relatively empty scene with just my character and the environment, but I've added a couple hundred set pieces to my scene and suddenly Volumetric Scattering adds up to 1000 draw calls to my scene. The set pieces are on a layer that sunshine is set to ignore and they are not using sunshine shaders, so as far as I understand sunshine should not be interacting with them. When I remove either the set pieces or volumetric scattering the draw calls drop back down to a manageable level. I don't know if this has anything to do with it, but the set pieces are using a cutout shader as they are billboards. Do you have any ideas on what would be causing this jump in draw calls?

    Thanks,
    ~ Ceraph
     
  35. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The most obvious reason would be the billboards rendering into Sunshine's Lightmap, but if they're on a layer Sunshine is ignoring as you say, this shouldn't be the problem.

    Another reason might be Sunshine's Scatter effect using Unity's Camera.Depth texture. If it's the only postprocess effect in your scene, Unity might be building the Camera's Depth texture purely for the Scatter effect. You could test for this by using another image effect that uses Depth, such as SSAO and see if your drawcalls skyrocket in the same way.

    Do your billboards use some custom drawing/rendering logic by any chance? It may be possible they're getting rendered into the Lightmap even though they're on an ignored layer..

    If you're using Unity 5 the new Frame Debugger can really help track down the source of these types of issues. As always, if you PM me a scene demonstrating the issue, I'll try my best to get to the bottom of it.

    Cheers,
    Oren
     
  36. Ceraph

    Ceraph

    Joined:
    May 16, 2013
    Posts:
    19
    Camera.Depth Texture does appear to be the culprit. When I remove sunshine and add in SSAO I see a similar jump in draw calls and sure enough the profiler is report an average of 800-900 draw calls under UpdateDepthTexture for both sunshine and SSAO.

    Thanks for helping me narrow that down! I will have to do some research into how to reduce the impact Depth Texture has on my draw calls.
     
  37. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    No problem, happy to be of service.
     
  38. Zargiz

    Zargiz

    Joined:
    Feb 27, 2015
    Posts:
    1
    how to enable shadows on tegra devices ?
     
  39. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    If you want to support a Tegra 3, which is the minimum chipset we've gotten working, you'll want to make sure Sunshine is set to use the "Mobile Shader Set", and you'll need to use the included "Sunshine/Mobile/" shaders that are specifically built for SM2 support.

    A simple mobile example scene is included, so you'll want to take a look at that too.

    Hope this helps,
    Oren
     
  40. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    Hi, I have a question.

    This asset works with games of isometric perspective or topdown?
     
  41. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It certainly works with Orthographic cameras, but I haven't tested with custom/skewed projections. If you are using the regular Camera "orthographic" option, it should work fine.

    Cheers,
    Oren
     
  42. PatataFrita

    PatataFrita

    Joined:
    Oct 17, 2014
    Posts:
    50
    I have not tested because I have not bought yet. :p

    My game has a topdown view but not use orthographic camera. So this asset is not for me?
     
  43. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    If you're using a custom projection matrix, I don't know if it would work. Top-down games can usually get away with billboarded light rays, so I'm not sure that Sunshine is a good fit as far as Scatter goes. If you feel like trying it out, rest assured I'll refund the purchase if it doesn't work out for any reason. I try to keep things risk free. ;)
     
  44. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Hello, I think I am having a great interest in getting Sunshine.

    I saw from the Asset Store that this package contains shader replacements.

    Does that mean I have to replace my shaders with the prepared shaders to make "Sunshine!" work?

    Or does it work out of the box by just attaching a script?
     
  45. smallfly

    smallfly

    Joined:
    Feb 3, 2013
    Posts:
    14
    @PolyVector

    Hi,

    I'm considering to buy Sunshine!. I have few questions before going forward:
    - Could you please confirm that Sunshine! includes all the functionalities of Shadow Softener ?
    - Is Sunshine! fully compatible with Unity v5 Personal edition released yesterday?
    - If not, when do you plan to release an update?

    Thanks!
     
  46. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Replacement shaders are needed only if you use Sunshine's "custom shadows" feature, and even then they are only required for Forward rendering. If you use Deferred Rendering, or are only using Scatter, you shouldn't have to replace any shaders in most cases.

    We're going to be starting work today on testing our assets with Unity 5, so hopefully any required updates will be out relatively quickly.

    Sunshine is actually quite different from Shadow Softener, I'll attempt to highlight some differences.

    Sunshine implements it's own shadow mapping system (Directional only) totally separate from the built-in one in order to render volumetric light (scatter). It also supports Overcast shadows to simulate clouds, and up to a PCF4x4 filter. It has some interesting uses on Mobile because the shadows are forward rendered and can be quite efficient, along with allowing you to control the shadows more tightly (updating only when the player moves X amount for example.

    Shadow Softener augments the built-in shadows to allow up to 8x8 PCF, depending on the rendering technique used or shader's complexity. It can soften Directional/Point/Spot shadows, and could even work in Unity Free's very limited 1-light Hard Directional shadows. Now that Unity 5 won't limit shadow filtering to Pro users, you should be able to get 5x5 PCF for free, which is great news. We'll see what this means for Shadow Softener as we investigate Unity 5 more this week.
     
    LampRabbit likes this.
  47. smallfly

    smallfly

    Joined:
    Feb 3, 2013
    Posts:
    14
    Thanks for the fast and complete reply.
     
  48. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Hi, PolyVector

    I have used sunlight, had good results, but only had access to it via a pro license based at work. Here is a quick shot of some prototype map work:



    I do very much love your asset!

    Can it work with the new unity 5 personal edition as I could then use it in my other projects out of work.
     
    LampRabbit likes this.
  49. LampRabbit

    LampRabbit

    Joined:
    Jan 31, 2013
    Posts:
    30
    @superme2012 Dude that is awesome! is there anything else going on other than Sunshine?
     
  50. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.7.0 is Available in the Unity Asset Store

    • Major overhaul for Unity 5 Final!
    • Added replacement Standard shaders
    • Added replacement Standard Terrain shaders
    • Removed legacy code for Unity 3 and 4
    • Fixed a ton of bugs in Legacy shaders
    • Removed deprecated "x2" lighting calculations from replacement shaders
    • Added SUNSHINE_PUREPIXEL mode for shaders that have no free Texture Interpolators (common for Terrain shaders)
    • Added SUNSHINE_SURFACE_VERT_PIGGYBACK2 macro for Vertex Modifiers that accept 2 parameters
    • Optimized SunshineRenderer class
    • Added PCF 4x4 support to Deferred/Prepass shaders, was previously limited to 3x3
    • Renamed Deferred/Prepass shaders to make them easier to identify and select in the Edit->Graphics menu

    Thanks to the release of Unity 5, Sunshine is now available to Unity 5 Personal developers! Pro is no longer a requirement.

    We’d also really appreciate it if you leave a review on the asset store.
     
    LampRabbit likes this.