Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

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 is unrelated to NFAA since that's a Standard Asset for post process antialiasing.

    There is a clue however in the errors, your project appears to be targeting Shader Model 2.0. Sunshine can only work in SM2 if you set Sunshine to use the "Mobile Shaders" set and make sure your materials use "Sunshine/Mobile/..." shaders. There is a section in the documentation explaining mobile support in more detail.
     
  2. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi there,

    My project is not targetting SM2, this error only appears if I enable LOD fix in build time.
     
  3. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I can't imagine how Sunshine would affect a random postprocess shader, strange. If you could PM me a project demonstrating the problem, maybe I can see what's going on.
     
  4. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Finally found the problem with the occluders at build time: seems something related with your SpeedTree replacement shaders. Changed shaders with the original ones, and now Scatter is working correctly. (but console is still giving the SM2 error in compile time).
     
  5. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Glad you managed to get it working.

    As for the shader errors, I can assure you they're unrelated to Sunshine and it should probably be reported to Unity.
    Here's how I was able to reproduce it without Sunshine:
    1. Create a new project
    2. Go to Assets->Import Package->Effects to load the standard Image Effects
    3. Find NFAA.shader and on the "Compile and show code" pulldown menu, enable "All Platforms", and disable "Skip unused shader_features"
    4. Press Compile and show code
    I get the same errors you described. Most likely Unity needs to update their Standard Assets, but in the mean time you can do as the error suggests and add "#pragma target 3.0" to both passes at the bottom of the shader. That fixed it for me.

    Hope that helps.
     
  6. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Thanks for all of your support, the NFAA error was pretty strange. Sorry if I gave you too many headaches.
     
  7. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Glad I could be of help. And no worries, strange errors are part of the job. :)
     
  8. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,183
    I prefer to move all my plugin assets and folders into a sub folder of my choice in Unity's Asset folder. I noticed when I do this with Sunshine, this causes lots of errors when trying to Install Forward Shaders, and other options in Sunshine. Is it possible for you to tell your plugin to search for a subdirectory that matches the path within the Unity Asset folder, rather than giving an exact path to find assets?
     
    Last edited: Mar 17, 2015
  9. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I totally agree, and prefer to organize 3rd party Assets myself. Unfortunately we had to make the tough call to write Sunshine this way after the initial release in 2013. The main problem here is that Unity requires users to specify paths when including any .cginc file (that's not a built-in), so originally our shaders had lots of "../../../Shaders/" type references. When users would move shaders around, or copy this code to paste in another shader, everything would break and you'd be surprised how many people don't understand relative paths.

    A secondary problem is that .cginc files that include other .cginc files are relative to the parent shader that included it. This makes absolutely no sense, and means that we can't use relative paths between 2 .cginc files. Chalk it up to Unity quirkiness, but this is the only practical solution I've found.
     
  10. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,183
    Ok, at least there's a well-defined reason for that. Thanks for the info.
     
  11. SandMagic

    SandMagic

    Joined:
    Mar 18, 2015
    Posts:
    7
    Hi, I am very new to Unity development, and recently downloaded Unity 5. On recommendation from peers, I bought the current iteration of Sunshine, and per instruction, tried to install it.

    I have already added the SunshineCamera components to cameras. The documentation asks me to select the Sunshine prefab instance, and choose the primary directional light.

    I am stuck on this error, and have not been able to even enable Sunshine





    I am able to find this Post Scatter Shadder, but selecting it/ dragging and dropping it from the Project Window, cannot fix this. I am unsure how to continue.

    I have NO CLUE on the software side of things, being primarily focus on visuals, so if I am missing or not getting something basic, please understand...if it is a software thing, hopefully someone can walk me through it.

    Thanks very much..
     
    Last edited: Mar 18, 2015
    hopeful likes this.
  12. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    We've been getting reports of problems with Unity 5's shader compiler crashing and failing to properly import certain shaders with ambiguous errors like "Syntax Error".

    I would browse for the Scatter shader in your Projects tab and make sure it's compiling, not showing errors in the Inspector tab. You can then right-click on the shader and click "Reimport", which is a good thing to try when any asset fails to import.

    If this doesn't work, let me know and we'll go from there.
     
  13. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,183
    Currently, as mentioned in this thread, Unity 5 shadows do not seem to work with Unity's custom projection matrix. As this is an issue for me, I purchased your plugin yesterday and setup it up in Forward mode. Currently, shadows now at least show up, but if I skew or move my camera the shadows seem to creating a weird visual effect and then disappear afterwards.

    I created a repro .unitypackage for you and was wondering if you could take a look at it? I'm not sure if it's better to email you directly or post the package somewhere for you if you can look at it. Thanks
     
  14. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sunshine is not tested with custom projection matrices, only Perspective/Orthographic. If you PM me a link to the project, I'll take a look though and see what can be done.
     
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,183
    Ok. Thanks for responding. You prefer that through your email or Unity account? Or doesn't matter?
     
  16. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I prefer PMs on the fourms.
     
    Ben-BearFish likes this.
  17. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,183
    Ok, just sent it.
     
  18. Skunkie

    Skunkie

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

    • Fixed a regression bug affecting Cutout shadows, most notably the SpeedTree shader.
     
  19. SandMagic

    SandMagic

    Joined:
    Mar 18, 2015
    Posts:
    7
    Hi there.

    I tried reimporting but to no effect. I have also downloaded 1.7.5, but to also no effect. It now says that the Occulder Shader is missing/Invalid, while keeping the Post Scatter Shader error. I have documentation below...








    Again if I am missing something basic please understand...can anyone who has managed to get this to work in Unity 5 help me out? Am I doing the whole process of Assigning in the Inspector wrong? Am I supposed to Add certain Components?

    If it comes to going into monodevelop to fiddle around, I am willing to do it, but I'll have to be walked through it as I have no experience at all.
     
    hopeful likes this.
  20. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I have noticed the Shader compiler is a little unstable in Unity 5, and crashes from time to time leaving shaders uncompiled. Hmm.

    If you could zip up the project (or a smaller one reproducing the issue) and PM me a link, I'll take a look and see what can be done to remedy this.
     
  21. SandMagic

    SandMagic

    Joined:
    Mar 18, 2015
    Posts:
    7
    Hi PolyVector,

    Thanks for the offer, but I recently tried importing Sunshine into an empty scene. This scene only has a directional light, and a 3D plane, nothing else.

    I imported Sunshine into the project, and it is not working as usual, which leads me to believe it could be a setting on my machine, if Sunshine is workable on yours.

    I am using Unity 5 0.0f4 Edu

    I was looking directly at the Shaders in Shader Core Folder, and inspector says there is a Parse Error-Syntax Error. Images below. One with the error, the other withought it. I also tried just the default Sunshine Scene you have in your package, but the error persisits






    Strangely there is no Console Notification of an Error when I play the Sunshine Scene. When I click the Sunshine Prefab or the Shader itself in Shader Core, an error message does show up in the inspector.

    If even such a simple scene cannot use Sunshine, I see no reason to send over the Project atm, perhaps there is a fix I can do to some machine or project settings that I was unaware of?

    Also, just to make sure I did the basic step correctly: I am supposed to Drag the Sunshine.prefab from the Prefab folder into the scene hierachy yes?

    If there is any information you need, please tell me and I will try my best to provide it via images etc.
     
    Last edited: Mar 25, 2015
  22. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I'm using the same version of Unity and can't seem to reproduce it, and I just compiled the Scatter shader for every platform/variant combination with no errors. I was going to ask you what happens when you press "Compile and show code" for that shader, but you don't appear to have the button, which is very interesting. Even a shader with all sorts of syntax errors will at least attempt compiling.

    Perhaps Sunshine is triggering a Unity/compiler bug that's only present on a particular platform. I test on Windows/Mac, but both are 64bit, is your machine 32bit?

    This sounds like a compiler/serialization issue to me. If it was an actual syntax error I'd see it too, and you'd get the "Compile" button.

    A couple experiments to run:
    1) Try editing the shader, adding a space or 2 and saving... does Unity compile it?
    2) Try duplicating the shader, is the duplicate working?
     
  23. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    Everything seems to be working fine (except the three cascade option), but I'm getting this after a fresh import:

    Maximum number (128) of shader keywords exceeded, keyword SUNSHINE_THREE_CASCADES will be ignored.
    You will have to delete some shaders or make them use less keywords.
    Keywords used in project now: DIRECTIONAL DIRECTIONAL_COOKIE DIRLIGHTMAP_COMBINED DIRLIGHTMAP_OFF DIRLIGHTMAP_SEPARATE DISABLE_3D_TEXTURE DISABLE_AXIS_ALIGNED DISABLE_LIGHTING DYNAMICLIGHTMAP_OFF DYNAMICLIGHTMAP_ON EFFECT_BUMP EFFECT_HUE_VARIATION ENABLE_3D_TEXTURE ENABLE_AXIS_ALIGNED ENABLE_LIGHTING FOG_EXP FOG_EXP2 FOG_LINEAR GEOM_TYPE_BRANCH GEOM_TYPE_BRANCH_BLEND GEOM_TYPE_BRANCH_DETAIL GEOM_TYPE_FACING_LEAF GEOM_TYPE_FROND GEOM_TYPE_LEAF GEOM_TYPE_MESH GLOWEFFECT_BLEND_ADDITIVE GLOWEFFECT_BLEND_MULTIPLY GLOWEFFECT_BLEND_SCREEN GLOWEFFECT_BLEND_SUBTRACT GLOWEFFECT_MULTIPLY_COLOR GLOWEFFECT_MULTIPLY_COLOR_OFF GLOWEFFECT_USE_GLOWCOLOR GLOWEFFECT_USE_GLOWCOLOR_OFF GLOWEFFECT_USE_GLOWTEX GLOWEFFECT_USE_GLOWTEX_OFF GLOWEFFECT_USE_MAINTEX GLOWEFFECT_USE_MAINTEX_OFF GLOWEFFECT_USE_VERTEXCOLOR GLOWEFFECT_USE_VERTEXCOLOR_OFF HDR_LIGHT_PREPASS_OFF HIGH_PRECISION_DEPTHMAP_OFF HIGH_PRECISION_DEPTHMAP_ON LIGHTMAP_OFF LIGHTMAP_ON LOD_FADE_CROSSFADE LOD_FADE_PERCENTAGE OCTAVES_1 OCTAVES_2 OCTAVES_3 OCTAVES_4 OCTAVES_5 PIXELSNAP_ON POINT POINT_COOKIE QUALITY_HIGH QUALITY_LOW QUALITY_MED SAMPLES_HIGH SAMPLES_LOW SAMPLES_MEDIUM SAMPLES_ULTRA SAMPLES_VERY_LOW SCATTERING_OFF SCATTERING_ON SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_NATIVE SHADOWS_NONATIVE SHADOWS_OFF SHADOWS_SCREEN SHADOWS_SINGLE_CASCADE SHADOWS_SOFT SHADOWS_SPLIT_SPHERES SOFTPARTICLES_OFF SOFTPARTICLES_ON SPOT SUNSHINE_DISABLED SUNSHINE_FILTER_HARD SUNSHINE_FILTER_PCF_2x2 SUNSHINE_FILTER_PCF_3x3 SUNSHINE_FILTER_PCF_4x4 SUNSHINE_FOUR_CASCADES SUNSHINE_ONE_CASCADE SUNSHINE_OVERCAST_OFF SUNSHINE_OVERCAST_ON SUNSHINE_TWO_CASCADES UNITY_COLORSPACE_GAMMA UNITY_HDR_ON USE_BOX USE_CONE USE_CYLINDER USE_SPHERE USE_TORUS VERTEXLIGHT_ON V_MM_IBL_OFF V_MM_IBL_ON V_MM_REFLECTION_OFF V_MM_REFLECTION_ON V_MM_TEXTURE_AND_COLOR_OFF V_MM_TEXTURE_AND_COLOR_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHATEST_ON _BUMPMODE_PARALLAX _DETAIL_MULX2 _EMISSION _EMISSIONMAP _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _METALLICGLOSSMAP _NORMALMAP _PARALLAXMAP _SPECGLOSSMAP _TERRAIN_NORMAL_MAP _TERRAIN_OVERRIDE_SMOOTHNESS _USE_ALPHACLIP_ON _USE_BLUE_ON _USE_DISPLACE_ON _USE_FRESNEL_ON _USE_GREEN_ON _USE_PANNER_ON _USE_RED_ON _USE_UVANIM_ON _UVSEC_UV1 _VERTEXCOLORMODE_ALBEDO _VERTEXCOLORMODE_EMISSION _VERTEXCOLORMODE_NONE _VERTEXCOLORMODE_SPECULAR
    UnityEngine.Shader:DisableKeyword(String)
    SunshineKeywords:SetKeyword(Int32, String[]) (at Assets/Sunshine/Scripts/SunshineKeywords.cs:33)
    SunshineKeywords:SetCascadeCount(Int32) (at Assets/Sunshine/Scripts/SunshineKeywords.cs:65)
    SunshineCamera:ConfigureShaders() (at Assets/Sunshine/Scripts/SunshineCamera.cs:550)
    SunshineCamera:OnPreCull() (at Assets/Sunshine/Scripts/SunshineCamera.cs:622)
     
  24. SandMagic

    SandMagic

    Joined:
    Mar 18, 2015
    Posts:
    7
    Hi Polyvector!

    I tried your suggestions, and changing the name of the shaders made it compile, and it is working now! There is no problem when using a normal FPS camera

    I have a new question, and some clarification needed. I am testing out the Oculus Rift, and I do not really understand when you say: Specify a stereoscopic master camera on one of your two sunshine instances.

    Firstly, where do I add the Sunshine Component to the OVR FPS Controller? I have tried adding them but the screen always shows black when I try to do it.

    Thanks again!
     
  25. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Unity has a fixed number of keywords that can be used by all shaders in your project including built-in and 3rd party. This frequently happens when downloading many assets/packages to try out.

    The simplest way to fix this is to remove any assets that you aren't actually using in the project, and restart the editor. Restarting the editor is required to make sure Unity refreshes which keywords are actually being used.

    Glad it worked, it can be frustrating when Unity's compilers aren't cooperating.

    I haven't tried the new Oculus support in Unity, but last year when I designed this feature, this was the process. Hopefully the SDK hasn't changed too much.
    1. Make sure the Sunshine Prefab is in your scene as usual
    2. Add the SunshineCamera component to both your Left and Right eye cameras
    3. Set the "Stereoscopic Master Camera" of one SunshineCamera to point to the other.
    Sunshine will take care of the rest by automatically reusing the shadowmap between both cameras. If the SDK no longer uses 2 separate cameras, then I might have to rethink the way this feature works in a future update.

    Hope this helps.
     
  26. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    i can't customize CORE FRAMEWORK's shaders using the example in the folder.. is there a way to fix this?
     
  27. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The "VertFrag" example shader should apply to the CORE framework, since I believe their shaders are all pure vert/frag.
    Remember to do your modifications to the ForwardBase pass of your CORE shader.

    If all else fails, there is an alternate way to integrate Sunshine into a shader, although it's slightly less efficient:

    First, you include Sunshine in "Pure Pixel" mode, which doesn't any require vertex calculations:
    Code (csharp):
    1.  
    2. #define SUNSHINE_PUREPIXEL
    3. #include "Assets/Sunshine/Shaders/Sunshine.cginc"
    4.  
    Then, when you want to get the light attenuation from Sunshine, pass it the World Position of the pixel:
    Code (csharp):
    1.  
    2. float myCustomLightAttenuation = SUNSHINE_LIGHTDATA_FROM_WORLD(worldPosition);
    3.  
    This does assume of course, you have the world position, probably calculated in the vertex shader somewhere.

    I hope this helps.
     
  28. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    936
    Hey there,

    Just wondering how well Sunshine works with procedural worlds such as, for example, a voxel engine. In other words, the player can place and remove blocks and modify the terrain during runtime. I'm looking for a more realtime sunlight/shadow solution for my engine, since baking sunlight as voxel lighting into the world makes world loading take too long (and I can't have worlds that take too long to load!)

    I may not entirely understand how Sunshine works. I understand that it is a realtime shadow system. Could I use it in such a way to where areas exposed to the sunlight are bright, but, say, underground areas or areas blocked off from the sun stay darker? The issue I have with Unity's directional light is that the light affects all objects equally and isn't stopped by obstacles.

    Thanks in advance.
     
  29. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Both the built-in shadows and Sunshine should be able to do what you want if you enable shadows on the directional light. In both cases you would need to take care that your voxel system is properly casting shadows. This process is different with both systems, but does require shader programming knowledge in either case.

    For example, Built-in shaders require a shadow collector pass, but Sunshine requires that your shader works with it's "Occluder" shader.

    I personally think voxel games do best with custom shadow solutions that are "baked" into the voxels as the level loads or as the player edits them in the background. This approach allows for unlimited shadow draw distance, and great performance.
     
  30. Tyrone843

    Tyrone843

    Joined:
    Jul 16, 2014
    Posts:
    6
    Hello PolyVector.
    I bought the asset yesterday. The issue is my game is mostly based outside and the asset causes a foggy/hazy effect;

    looks great when in the shadow though. I have read a previous post here (and your reply to it) that was having the same issue I am having. Do you plan to put in an option to only show the affect when in the shadows?

    Thanks,
    All the best.
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,319
    hi oren,

    i am using sunshine 1.7.5. with unity 5.0.1. in deferred on os x 10.10.2.
    i have assigned the "Sunshine-DeferredShading" shader and everything looks sun shined – apart from the fact that alpha testing seems to not be supported (please have a look at the screen shoots below).
    the shader that uses alpha testing is the built in standard specular shader.

    is this a known bug or do i miss something in my set up?

    cheers, lars


    unity built in DeferredShading shader: correct alpha tested shadows.

    Bildschirmfoto 2015-04-12 um 22.18.00.png


    sunshine DeferredShading shader: shadows ignore alpha testing.

    Bildschirmfoto 2015-04-12 um 22.18.17.png
     
  32. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I could be wrong, but it looks like you're using a Ramp Texture for Scatter and it's set to "Repeat" instead of "Clamp" in the texture import options. Here are a few things to try to avoid too much of a "foggy" look:
    • Reduce the Scatter Exaggeration so you don't notice the effect so close up.
    • Reduce the Intensity to the minimum required for the scene. Subtle is usually better with this effect.
    • Try using a Ramp texture so you don't see scatter when looking away from the light. As I mentioned earlier, use "Clamp" and not "Repeat" for the import settings, there are a few included example textures.
    • Dynamically adjust the effect indoors/outdoors. This should be relatively easy by casting 1+ rays in the opposite direction of the sun to see if you hit anything, then modifying Sunshine.Instance.ScatterXXX accordingly.
    I hope this helps

    It looks like you might be using a shader with the wrong/unspecified RenderType, like "Opaque" instead of "Transparent". You can see that the quad is affecting the grass in the background as well, which shouldn't be the case.

    The shadow casting is done in Sunshine Occluder.shader, so the RenderType of your shader needs to correlate with one of the RenderTypes in that shader. If you have trouble getting it to work, feel free to PM me a small scene and I'll take a look at it for you.
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,319
    hi oren,

    the shader that uses alpha testing is the new built in standard specular shader – set up to "transparent".
    and i would assume that this shader declares the correct RenderType ;-)
    in case you still nedd or want a little test scene i can of course send one.
    cheers,
    lars
     
  34. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Actually, it appears that Unity isn't respecting their own conventions on this one. The Standard Shader is always rendering as "Opaque", but multi_compiled with _ALPHATEST_ON as an option, so Sunshine's Occluder shader never sees it as "Transparent".

    Thank you for bringing this to my attention, I'll try to push out a fix this week.
     
    hopeful likes this.
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,319
    that sounds great!
    thank you.
     
  36. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    867
    Hi,
    I'm considering whether to buy your package or wait a little more.

    I'm a bit worried that even if the package seems to be heading to Unity 5, there's no "Unity 5 compatible" declaration anywhere in the product description. Is it intended?

    I'm still working with 4.x but I'm probably going to switch to 5.x for my next project which I'd really like to ship out with your plugin.

    A few questions:
    1. Does the product work perfectly "out of the box" in Unity 5?
    2. Are there any issues with using the package in Unity 5?
    3. Are you going to give full support to Unity 5 in the future?
    4. Does Unity 5 hamper any of the product's features, thus making the results different from the ones showed in the WebDemo?
    5. Are you going to provide a new WebDemo to demonstrate the product compatibility with Unity 5 to new potential customers?
    Thanks for your time and attention :)

    I'm really looking forward to be able to use your product without any issues.
     
  37. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    You're completely right that I should add "Unity 5 support" to the description in the next update. To answer your questions:
    1. If you are asking if Sunshine requires zero setup, then "yes and no". If you use Deferred rendering, or are only interested in the Light Scatter (not custom shadows) the setup is mostly just dropping the component in your scene and tweaking settings. If you use Forward rendering and want the Custom Shadows, you do have to swap out your shaders for Sunshine compatible ones. This also occasionally applies to shaders that are "Forward only" even in the Deferred renderer.
    2. I do my best to address any issues people come across, but no software is perfect and Unity doesn't make integrating custom shadows easy by any means. For example, there is an outstanding issue I'm aware of where the Standard shader's transparent features are casting opaque shadows, and I hope to get that resolved this week.
    3. I am fully supporting Unity 5 now.
    4. No, Unity 5 is really the primary target right now, other versions are secondary.
    5. The WebDemo is fairly out of date (Unity 4), but Sunshine has only improved since then.
    I hope this helps.

    Edit: I probably should have linked to the Documentation, it's really helpful to give you an idea of the setup process
     
  38. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    867
    It helps a lot, thanks for all the explanations, I'm getting Sunshine sometime soon :)
     
  39. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.7.6 is Now Available in the Unity Asset Store
    • Standard Shader now correctly casts cutout shadows
     
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,960
    A few tips for anyone struggling to get Sunshine installed and working (as has been the case for me):

    Import Sunshine and then exit Unity.

    Start Unity again and click on each Sunshine shader to make sure it compiled correctly. I find a number of them don't compile correctly the first time around. Click on each shader that hasn't compiled correctly and select "Reimport." (Note that if your situation is like mine, reimporting will do you no good at all unless you have already exited and restarted Unity in the step above.)

    It is possible that you may have to upgrade from Unity 5.0.0f4 to Unity 5.0.1f1 before it will work. I'm not sure about that, but after I moved to 5.0.1f1 and performed the steps above, I was FINALLY able to get past the numerous errors and have the demo work.

    EDIT: Over 20 shaders need to be reimported, and 4 will still fail to compile, and they are:

    SpeedTree (appears to go into an endless loop or an extremely long time to compile)
    TreeCreatorLeavesFast
    TreeCreatorLeavesFastOptimized
    SunshineVertFragExample
     
    Last edited: Apr 16, 2015
  41. romaing

    romaing

    Joined:
    Feb 11, 2010
    Posts:
    24
    For example, there is an outstanding issue I'm aware of where the Standard shader's transparent features are casting opaque shadows, and I hope to get that resolved this week.[/QUOTE]

    Any news about that issue?
    It'll be great to have it work with transparent/fade Standard shader.
     
  42. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    I download Sunshine 1.7.6 but doesn't work. I get lots of "Parse error: syntax error at line 1"

    When I click on sunshine prefab error says Postprocess Scatter Shader is missing
     
  43. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    A warning says (Sunshine 1.7.6: Occluder Shader Not Supported...)
     
  44. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    That was the update that fixed the issue, so Cutout/Transparent/Fade materials using the Standard shader should now have cutout shadows. We don't support dithered transparency for shadows yet if that's what you're asking.

    This sounds like the same Unity problem many people seem to have and it's caused by the SpeedTree shader randomly crashing the shader compiler. After that happens other shaders fail to import and report bogus syntax errors.

    I would simply restart Unity and right-click on any shaders that are giving you trouble (like Sunshine Occluder) and and select "reimport". It should fix itself.
     
    ksam2 likes this.
  45. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    It doesn't solve the problem! I've done lots of tricks but still no chance
    I can Import sunshine v1.6.5 without any problem !!!!!!!!!!!!!!!!!!! but not this version.
     
  46. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Try deleting that shader and reimporting it.
     
  47. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Doooooooooooooooooooooooooesn't work
     
  48. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Ok, I'm going to use V1.6.5 again! is there a lot of difference between V1.6.5 and V1.7.6 ?
     
  49. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It's all in the changelog.
     
    ksam2 likes this.
  50. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.7.7 Available in the Unity Asset Store
    • Fixed SpeedTrees not casting shadow on Build
    • Fixed SpeedTree culling not matching the material's setting
    • Removed unused SpeedTree passes