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
    Okay, so I would certainly say your scale is too large, but that's probably not causing the biggest problem you have. Personally I'd scale it to 1/10th the size, not because it's realistic or unrealistic, but to keep floating-point error down, and so that things like Padding Z have a higher limit. Padding Z is to allow for shadow casters outside the camera's frustum, and if your scene is that large, even 1,000 may be too low.

    As for the real problem, infinite distance on rays, this is because Sky Intensity is set to zero so when the shadowmap extents are reached, the rays vanish. Realistically, the value should be 1.0 since the light rays are essentially fog, and fog doesn't stop after it hits maximum volume. That option is mostly there so that skyboxes don't become washed out, but in space it would really have to be 1.0 since you can easily see the extent of the rays. This might not look great however, but it would stop the rays from looking horrible when the Sun is behind you. On land, sun rays intersect with the ground, so this issue would rarely be visible.

    Another solution would be to fade out the rays based on the direction the camera is facing. You could do this in a small script attached to your camera (Untested):
    Code (csharp):
    1. Sunshine.Instance.ScatterIntensity = Vector3.Dot(-camera.transform.forward, Sunshine.Instance.SunLight.transform.forward) * 0.5 + 0.5;
    It would be better to fade out per frustum corner for continuity. If this is something you want, I will try and see if I can tweak Sunshine to do this for you on the weekend. :)
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    I was keeping Sky Intensity down to give a darker scene atmosphere but looks fine at 1.0 too.

    I'm aware of FP limits and I don't plan on making any scenes where I'll need more than 5k in either direction. I already tried traveling to planets and using over 100k units and got some warnings. Surprisingly no real noticeable artefacts but Unity didn't like it anyway. I suppose the precision is needed high fidelity calcs where another decimal could make a difference. I have to make a system that moves the world around when you're traveling to the planet surface... That'll be fun.

    That is the issue in a nutshell. I know Sunshine wasn't design for this, but any tweak it up to better support the scenario it would be fantabulous.

    I messed around with the code, I don't think that idea will work though.. It's fading all intensity which feels pretty unnatural, especially with Sky cranked up. That Frustum corner idea sounds like science, and science usually works so tear it up if you want :) .

    I think I might use that script to increase the intensity when looking toward the sun though... That would be cool.

    I'll keep experimenting, but I'll probably be spinning my noob-coder wheels with any kind of code tweaks as most of the scripts are over my head.
     
  3. renardmf

    renardmf

    Joined:
    Jun 29, 2012
    Posts:
    47
    Hello,

    I have been having a lot of fun playing around with Sunshine. I had a few questions though. Do you think it would be possible to modify shaders that are created in Shader Forge to get it to work with the forward rendering option?

    Also, I haven't been able to test it thoroughly, but I have tried in two existing projects, including the Unity Mecanim Tutorial one, to use Sunshine in the deferred mode and I get an issue where I setup the scene with the Sunshine prefab and Camera Script and when I goto restart Unity to get it to use the deferred shaders as mentioned in the docs it will crash Unity when trying to load that specific scene. I haven't had similar issues using the forward rendering setup. I am running unity 4.3.3 and Sunshine 1.4.4 in Windows 7 x64.

    Any help is much appreciated.

    Thanks in advance.

    Edit: Both those projects were running in DirectX 11 mode if that helps.
     
    Last edited: Jan 27, 2014
  4. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Okay, I'm going to add "View Dependancy" to my TODO list, so that some kind of fade in/out can be achieved. I don't have a lot of free time these days, but hopefully the next update will contain some form of this to allow you to prevent looking infinitely down the rays length. :)

    I haven't used Shader Forge, but assuming they produce regular ShaderLab code, I would assume so. Have you tried modifying them using the process described in Sunshine's help? If you have trouble, feel free to send me a shader and I'll do my best to help integrate Sunshine in it for you... I also have plans to eventually add an automatic "converter" script, much like the one I include in Shadow Softener.

    I've been receiving a lot of reports of Sunshine crashing when Unity loads. Supposedly a workaround is to load a non-Sunshine scene first, and then there is no problem loading your scene (although I can't confirm this as I have yet to reproduce the crash). I should get a chance this week to work on it, since this bug just so happens to overlap with my current job. The second I fix it, you'll be sure to see a Sunshine update. (Thanks for the details btw, it really helps)
     
    Last edited: Jan 27, 2014
  5. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Sunshine 1.4.5 is now available in the Unity Asset Store!

    • Fixed Editor crashing in newer versions of Unity at startup
    • Optimized Mobile and Scatter shaders.
     
  6. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    Just when I was getting used to closing without Game View showing.
     
  7. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Quick question before purchase... does this play nice with ShaderForge shaders and does this have any 'new' limitations over the built in shadows?
     
  8. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    In the Deferred renderer everything pretty much "just works". In forward rendering shaders must support Sunshine, so they would require manual changes. Almost all built-in shaders are already modified for you, but ShaderForge shaders would need editing.

    I highly recommend reading through the documentation before buying to get an idea of how things are set up. :)
     
  9. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Hi there, just got Sunshine and I'm digging it, thanks! Just a quick question, I'm using a lot of shaders in my project and sunshine seems to eat up a lot of shader keywords, which put me over the 64 limit. If I'm using deferred rendering and am unlikely to need to turn on forward (in which case I would reimport) with mostly third party shaders (RTP3, Skyshop, AFS, etc.) what shaders from the package can I safely delete to get things rendering properly again?
     
    Last edited: Jan 31, 2014
  10. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sunshine is as lean as I could make it, sometimes you can get it to work with an overly complex shader by leaving excluding large filters like PCF4x4 from the multi_compile line...

    You don't need to delete anything, If you aren't using Forward rendering you can hit "Uninstall" (if you've installed) to make sure you aren't swapping out any shaders, and then check "Manual" just in case you need to manually swap out a forward rendered shader or two, for example a transparent shader.

    If you absolutely want to delete the included shaders, which isn't recommended, make sure to keep the following:

    Shaders/Sunshine.cginc
    Shaders/Core/*
    Shaders/Built-In Replacements/Deferred/*


    All other shaders are for Forward rendering.

    In deferred, any shader that's rendered in Deferred mode will "just work" without any effort change.

    Hope that helps. :)
     
  11. brzozowsky

    brzozowsky

    Joined:
    Sep 12, 2011
    Posts:
    39
    Is it possible to use only shadows from directional light with sunshine , not the color and intensity?

    My idea is to bake all lights to lightmaps and use only sunshine to render a dark, smooth directional light shadow, but not the directional light color or intensity. How can i adjust only the shadow intensity?

    Is this way possible with sunshine?
     
    Last edited: Jan 31, 2014
  12. Katarak

    Katarak

    Joined:
    Feb 19, 2013
    Posts:
    13
    Hey PV,

    I'm going to start off by saying that your light scatter is awesome. I was able to create some interesting effects, even if my scene is in broad daylight outside in an urban environment.

    I had previously asked you if we could "bake" the shadows in the whole scene. and you said it was possible... I tried and it seems to work well, but I am having 1 very specific problem. Our game is 3rd Person Action in an urban environment with procedurally generated maps. Using Sunshine I can bake the environment. so buildings cast shadows in the ground, and that works great, but I'm unable to have the player character not have his shadow baked, and have it dynamically cast a shadow on the ground aswell. I hope I'm being clear.
    I've tried to remedy the situation by adding another light which affects the character only, but then no shadow is cast on the ground. if I add the ground, then it's super bright! because 2 lights are affecting it.

    Any ideas on how I could do this?

    Thanks,
    K
     
  13. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Sunshine should work with any custom lighting model, and you can access the shadow term directly if needed, so you should be able to do something like that. It's all up to you shader programming skills. :)

    Well, it's a single shadowmap, so it's either "baked" or dynamic. Unfortunately Sunshine only supports a single Directional light, so any solution is going to involve you working with Unity's shadows. Even if it was supported, I wouldn't recommend creating a separate shadowmap simply for characters, performance-wise.

    You could use a blob shadow for the player, although I know that's not the answer you were looking for. :/
     
  14. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Got a chance to play with the package a little further. I had to mess around with the settings to get it to render tree shadows, and it was absolutely crushing my framerate, even with a shadow distance of 40. Then I realized that asking Sunshine to render the "Terrain" layer shadows was computing shadows for not just the trees but terrain and grass as well. The grass is kind of cool, if not expensive, but the terrain shadows were blob-y and weird. How would I go about getting sunshine to act more like the built-in shadows and render the player shadows dynamically along with close trees without rendering everything else that unity considers part of the terrain (grass, heightmap, etc.)? Or, could I optimally keep the grass, lose the terrain, stop the shadows from not rendering when the camera plane is (nearly) perpendicular to the surface where shadows are being cast (this causes the grass shadows to cut in and out depending upon camera angle)?

    And, I want a pony.
     
  15. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    Is there a way to have Sunshine only do Light Scattering so we could use built in shadows? Or a way to segregate Light Scattering from the shadow system?
     
  16. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Make sure you aren't rendering too many cascades... Cascades+foliage can be a performance killer.

    You know, I'm not entirely sure how to separate Terrain from Trees/Grass... Hrmmm.. I know you can disable shadow casting on Grass/Trees by deleting the corresponding SubShader in Sunshine Shadow Caster.shader. If you put the terrain on it's own layer and set Sunshine to not cast shadows from that layer... then the problem would become making sure the Trees are on their own layer that can cast shadows... I haven't tried this, but it might be possible using Tree prefabs...

    Oh, and here's your Pony, his name is Alfonzo.

    You should be able to, although it would mean creating shadowmaps for both light rays and shadows separately (wasteful).

    Here's how you might do it:

    Step 1:
    If you use Forward Rendering:
    Uninstall Sunshine, and then check the Manual mode... This will let you manually assign Sunshine shaders to your materials, which you aren't going to do.

    If you're using Deferred Rendering:
    Delete the shaders in Sunshine/Shaders/Built-In Replacements/Deferred/... This will make Sunshine do all of it's magic, yet not draw shadows.

    Step 2:
    Now your only problem is that SunshineCamera.cs and possibly Sunshine.cs will temporarily disable SunLight.shadows while it renders its own... You'll want to remove this code. If you do, shadowmaps will be created, light rays will be rendered, but built-in shadows will be left alone. ;)

    Hope that helps!
     
  17. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Hmm. I don't know how the built in shadows do this, but they do. What is happening at this point is that I'm getting weird self-shadows on the terrain over the lightmap that don't look right; that doesn't happen with the built-ins. If you can think of something let me know, I love the light scattering and the shadows from Sunshine, but right now can't find a way to use it.
     
  18. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Built-in can do this because Unity has access to the rendering pipeline, things are trickier in userland. :/

    Have you tried setting the terrain to a layer that doesn't cast shadows?
     
  19. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Well, I need to have the trees and other objects on the terrain cast shadows below the lightmap shadowdistance because otherwise at that distance all baked shadows disappear and your player has a halo of no shadows around them... if I exclude the terrain the trees don't get or cast realtime shadows. Am I just missing an easier way to do this? Tree prefabs loses all of the advantages of the terrain system like billboarding and becomes insanely expensive to render in large outdoor scenes where you are already behind the ball.
     
    Last edited: Feb 1, 2014
  20. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    Interesting! Thanks, I'll look into it more.

    Technically, if its rendering them separately then I can just override the shadow settings on either and keep Sunshine at very low quality levels, that wouldn't affect Light Scattering.
     
  21. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I would highly recommend using a single cascade when you do this, and as low resolution as you can get away with... Single cascades are MUCH faster with Scatter (due to the numerous amount of samples that each need to jump between cascades)... and of course, there's the overhead of creating them in the first place. ;)

    Hope it works out. :D
     
  22. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I'm going to look into this problem more, although it's a tricky one. If you have a sample scene you can PM me that would help. Otherwise, it would be helpful to know if you're using Forward/Deferred, what type of LightMaps, and what platform you're targeting.. any info is good info. :)

    Terrain has many yet-unsolvable problems in Sunshine due to the lack of an API to control LOD... Shadowmaps should match the LOD from the Main Camera, but without a way of communicating that to the renderer, it calculates LOD based on the Shadow Camera(s), which is where the artifacts come in (casters mismatching what the player sees).

    Anyways, send me any additional info and I'll look into this further. :)
     
  23. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    One thing I've found to improve the terrain shadow artifacts, is try reducing the Padding Z... Not a perfect solution, but it does seem to help in a lot of my tests.
     
  24. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Cool, thanks, I'll give that a go. Appreciate your help on this. Even my test proj is quite large, I can maybe put it on google drive tomorrow. Thanks again.
     
  25. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    Update!

    Totally didn't work out, went back to the Sunshine amazeballziness. I mean, technically it worked fine but it wasn't as good. Glad I experimented with it to confirm. PCF 4x4 was the determining factor, others working in smaller scenes may have a different preference.

    I missed this post somehow - thanks!
     
  26. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    How well does this work over a very far shadow distance? I'm doing a military training sim for UAVs and we need good looking shadows over a very long distance. Unity's shadows seem to fall apart and we get a lot of flicker, could this be a good alternative?
     
  27. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    A solid "maybe". Sunshine has approximately the same resolution constraints as Unity's built-in shadows, but it is a bit more flexible though in that you can adjust the cascade spacing. Also, filtering is performed in shadow-space, so you get soft texels, rather than noisy-edged texels at large sizes.

    If you try it and it doesn't work out for your needs, just let me know and I'll get you a refund. :)
     
  28. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    Thanks for the quick replay and the money back guarantee. ;) I'll definitely give it a shot once I have some time to work them. I'll let you know what I find either way when I do.
     
  29. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,521
    FWIW I'm using a shadow distance of 6000 with PCF4x4 and it looks fine to me. It performs better than built in as you scale up.
     
  30. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    Thanks LaneFox, that's great to hear. I think that should work fine then, I think we are just going up to 4000. I'm excited to give this a try!
     
  31. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    Hey PolyVector,

    So we went ahead and bought Sunshine, and it seems to be better than the Unity Shadows with regards to flicker but now we have these bands:

    $SunShinebands.png

    I'm using a shadow distance of 3000 and if I lower that they go away, but so do the shadows since our scene is so big. Any ideas how to fix this?
     
  32. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Adjusting the Light's Bias is the main method of mitigating shadow acne. Increasing the shadowmap resolution, or the number of cascades can also help.
     
  33. NnelGdaBandit

    NnelGdaBandit

    Joined:
    Dec 21, 2012
    Posts:
    18
    Seems like the light bias was the solution, Thanks!
     
  34. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    Newbie questions?

    Will any differed rendered compatible shader work with this? (I'm using Tomasz Stobierski's RTP and RSP shaders)

    Thanks
    Travis
     
  35. moitias

    moitias

    Joined:
    Sep 17, 2013
    Posts:
    3
    Hi,
    just a quick bug report that you might want to take a look at, since it's pretty rough one to handle;

    In some cases (not sure what specifically causes it), if you have a scene set up with Sunshine Cameras and all, and delete your Library-folder to force Unity to recreate it, Unity will crash hard on start-up. This is pretty annoying and probably pretty panic-inducing if one is not comfortable digging through editor logs.

    Relevant parts of the editor.log:

    RenderTexture.Create failed: width height must be larger than 0
    UnityEngine.Camera:RenderWithShader(Shader, String)
    SunshineCamera:RenderCascades() (at Assets\Sunshine\Scripts\SunshineCamera.cs:166)
    SunshineCamera:OnPreCull() (at Assets\Sunshine\Scripts\SunshineCamera.cs:476)
    UnityEditor.EditorGUIUtility:INTERNAL_CALL_RenderGameViewCameras(Rect, Boolean, Boolean)
    UnityEditor.EditorGUIUtility:RenderGameViewCameras(Rect, Boolean, Boolean) (at C:\BuildAgent\work\d3d49558e4d408f4\artifacts\EditorGenerated\EditorGUIUtility.cs:512)
    UnityEditor.GameView:OnGUI() (at C:\BuildAgent\work\d3d49558e4d408f4\Editor\Mono\GameView\GameView.cs:291)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView:Invoke(String, Object) (at C:\BuildAgent\work\d3d49558e4d408f4\Editor\Mono\GUI\DockArea.cs:231)
    UnityEditor.HostView:Invoke(String) (at C:\BuildAgent\work\d3d49558e4d408f4\Editor\Mono\GUI\DockArea.cs:224)
    UnityEditor.DockArea:OnGUI() (at C:\BuildAgent\work\d3d49558e4d408f4\Editor\Mono\GUI\DockArea.cs:661)

    [C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Graphics/RenderTexture.cpp line 215]
    (Filename: Assets/Sunshine/Scripts/SunshineCamera.cs Line: 166)

    I'm guessing on that first round of running everything, for some reason the viewport is getting size reported as 0x0 -> Sunshine tries to create a 0x0 texture to render to -> Crash. A simple sanity check should probably fix it, or at least band-aid it..

    Unity 4.3.3f1, Sunshine 1.4.4. Can try to create a minimal example if required..

    Thanks for the plugin, it's still awesome!
     
  36. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I'll try to get this fixed for the next release. :)
     
  37. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    i have a question. does this work with any shaders? or is it only specific shaders? i use shaderforge and i'm wondering if this would work with it. thanks ahead of time.
     
  38. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The current requirement is that the shader already has shadow passes included so Shadow Softener can modify them... This means that right now ShaderForge shaders (vert/frag) don't work without extensive modification because they rely on Fallback shadow passes..

    The next release will support ShaderForge or any vert/frag shader with a single line of code. ;)

    Of course, if you are using the Deferred renderer in Unity Pro, anything/everything made to work with Deferred will work without modification. ;)
     
  39. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    Hi Poly,
    I'm interested in Sunshine for the Oculus Rift, can you confirm that it works properly/is supported? I noticed a guy saying he was having issues with it a few pages back.

    Cheers,
    Jay
     
    Last edited: Feb 25, 2014
  40. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    thanks for the info. your lighting system looks epic by the way. so as i understand it Shaderforge would have to add a line of code to make your shadows work? or get deffered rendering... well i'm afraid that while your lighting looks epic ill have to backseat a purchase until shaderforge gets deffered or supports you lighting engine. once that happens i see some artistic fun in my future though ; ) keep up the great work!
     
  41. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I really need to get more sleep, I just answered your question thinking you were talking about Shadow Softener. *face palm*... What I said mostly applies, except for the single line of code part, that's only going to be possible with Shadow Softener.

    Anyways, sorry it's not a good fit for you, believe me I wish Unity provided a way to cleanly extend their existing shadow system.
     
  42. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I don't have an Oculus Rift to test, but my understanding from talking with the user you're referring is that it works just fine. He was having a very specific issue with "Sunshine in Space", where players can look down the length of the light rays indefinitely instead of them eventually colliding with land... I have plans to address this in an update with "a view dependency" slider. ;)
     
  43. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Are the shadows in the webplayer demo as soft as possible, is shadow softener compatible with this?
     
  44. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The demo is set to PCF4x4 which is the softest filter ( Shadow Softener goes up to PCF8x8 ), but the Light Rays are not shown at the highest quality (plus they're improving in the next release!)

    Sunshine is really meant as a replacement for the built-in shadows, whereas Shadow Softener augments them... Using them together would mean tweaking Sunshine so that it doesn't use it's shadow system, but still creates shadowmaps for the Light Rays. This seems wasteful to me, since you'd be rendering an extra shadowmap, but it is technically possible.

    I'm looking into ways of rendering light rays outside of the Sunshine system, so they can use the Built-in shadowmap data, but I haven't come up with a usable solution yet... Unity's shadowmaps are a black box.
     
  45. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    I think the shadows look a bit crispy while moving. Would it suit a large world game using voxel terrain?
     
  46. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Well Sunshine filters in Shadow-Space, which means a couple of things:
    • The softness has a consistent physical size, so you can look as closely as you like without it changing.
    • The softness is in shadow-texel units, which means if you lower the shadow resolution the penumbra gets larger... Sometimes a lower resolution looks better than a high resolution.
    By contrast, the Built-in shadows filter in screen-space:
    • Penumbra size isn't consistent, so looking closely starts to reveal the pixelated shadows.
    • shadows farther away can still appear "soft".

    Which technique you prefer is really a matter of opinion, but I think Sunshine looks great at large scales. Keep in mind that Forward rendered shaders will require some editing to make them compatible with Sunshine. Also, if your voxel system uses a custom shadow caster pass, an equivalent will need to be added into Sunshine's Shadow Caster shader.
     
  47. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    So will Sunshine support Shaderforge?
     
    Last edited: Mar 8, 2014
  48. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    If you're using the Deferred renderer, and ShaderForge generates a Deferred shader, than it should automatically work.

    If you're using the Forward renderer, or a Forward shader, the shader will need to be edited to support Sunshine... Admittedly, this will be harder than usual because I believe ShaderForge generates VertFrag shaders, not Surface shaders.
     
    Last edited: Mar 8, 2014
  49. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Actually, I just noticed that ShaderForge supports custom nodes, I wonder if it would be possible to add a Sunshine node?... hrmmm...
     
    Last edited: Mar 8, 2014
  50. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    I'm interested in using both together, so anything you do to make them more compatible would be welcome.