Search Unity

Marmoset Skyshop - Image-Based Lighting Tools [RELEASED]

Discussion in 'Assets and Asset Store' started by monkeyscience, May 31, 2013.

Thread Status:
Not open for further replies.
  1. Katarak

    Katarak

    Joined:
    Feb 19, 2013
    Posts:
    13
    Hello Marmo,

    We are using Marmoset for our current project and recently switched to 5. Marmoset generally works properly, using the legacy deffered.

    Full Deffered doesn't seem to want to properly work. Is there an ETA for support for Full Deffered?

    Thank you
     
  2. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    23
    Hey monkeyscience,
    first of all thanks for the wonderful shaders.
    We're having troubles running it on android PowerVR SGX gpu devices (tested on: SGX531, SGX531u, SGX544MP3, SGX530, SGX540, SGX544, SGX544) it hangs on splash screen.

    Errors from logcat:
    02-26 13:46:23.416: E/Unity(29397): -------- GLSL error: Compile failed.
    02-26 13:46:23.416: E/Unity(29397): ERROR: 0:11: 'textureCubeLodEXT' : no matching overloaded function found
    02-26 13:46:23.416: E/Unity(29397): ERROR: 0:11: 'return' : function return is not matching type
    02-26 13:46:23.416: E/Unity(29397): ERROR: 2 compilation errors. No code generated.
    02-26 13:46:23.416: E/Unity(29397):
    02-26 13:46:23.416: E/Unity(29397): (Filename: Line: 145)
    02-26 13:46:23.607: E/Unity(29397): -------- Marmoset/Mobile/Transparent/Bumped Specular IBL
    02-26 13:46:23.607: E/Unity(29397):
    02-26 13:46:23.607: E/Unity(29397): (Filename: Line: 141)
    02-26 13:46:23.607: E/Unity(29397): -------- failed compiling fragment shader:

    same error goes on for some more shaders:
    02-26 13:50:36.561: E/Unity(29397): -------- Marmoset/Mobile/Transparent/Specular IBL
    02-26 13:56:56.302: E/Unity(29397): -------- Marmoset/Mobile/Bumped Specular IBL
    02-26 14:04:22.484: E/Unity(29397): -------- Marmoset/Mobile/Specular IBL

    Marmoset 1.11
    Unity3D 4.6.1p4
    Build settings in Unity: Force GL ES 2.0 and 24bit depth buffer checked
    Any solutions for this? Why it doesn't fallback?
     
    Last edited: Feb 26, 2015
  3. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Unity5. in transparent shader alpha is being ignored
     
  4. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    I think it's safe to say the shaders are broken at the moment in Unity5.
     
    Last edited: Mar 4, 2015
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Is it possible to use the skybox information for real time IBL change, maybe in a next update ?

    Would be really cool to have as option
     
  6. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Is there an ETA for proper Unity 5 compatibility? I'm not talking about shaders or anything, just the C# code that still references properties like "camera" instead of GetComponent<Camera>()? I take it other folks are just punching the auto-convert button, but I'm pretty uncomfortable with that.
     
  7. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Unity 5 is a bust for Skyshop right now, full of errors , just wondering an ETA on updating? Thanks.
     
  8. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Skyshop works for me in unity5, but it seems like the features i need to make skyshop different arent there =/ i really need to be able to "Select" a sky for a material, to specify indoor only objects to use those. might have to try and write something like that.

    (and i dont mean, specify a sky for an object, because that breaks batching, i want all objects of a specific material to batch and use a specific sky)
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    I am not yet sure how Skyshop will fit to my Sky Master dynamic sky setup and Unity 5 IBL.

    The questions are whether i can use my dynamic sky for the IBL through Skyshop and get some advantage over Unity's

    Otherwise the Sky Master skybox shader i now use will directly integrate with Unity 5 IBL, GI and shaders and all while the sky is changing and sun moving, seeemingly making Skyshop obsolete.

    So the big question is what benefits we can get from Skyshop in the new Unity 5 environment. I defintly loved the way it looked and have setup my whole project with it, so would be cool if i could somehow use my dynamic skybox shader with the atmospheric scattering and artistic effects like heat haze etc together with skyshop shaders for an enchance look over Unity 5's IBL.
     
  10. ph0b0s

    ph0b0s

    Joined:
    Dec 18, 2013
    Posts:
    19
    HI,
    I used Skyshop in my project intensely, we work with terrains and I had to tune the terrain shader that comes with marmoset to add Snow and Rain. For doing that I copied the Marmoset Terrain.cginc file and modified it to have some defines that do what I want to do with the snow. All works perfect in Editor but when we, after many work done, build a standalone version for PC , we got the 16 sampler limit in the shader error. There isn´t many help online about this error but what I read is that I would have to make an additional pass in the shader. That bring me to the point of my post, what is the right way to make custom shaders using the skyshop pipeline? I just have to add an overlay over the terrain with snow that receive the marmoset lightning and this is blocking me really hard, my bosses are almost decided to drop marmoset from the project but I don´t want to do that because this is an incredible visual enhancement to the project.
     
  11. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    I'm glad soon as I install I GET a number of errors, I had also 3 others on my team try they own it and they get it to, so there is an issue...
     
  12. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Added to Unity 5 and everything has gone black.

    Also i get an error

    error CD0117: "mset.Sky" does ot contain a definition for "activeSky"

    I hope there will be compatibility to Unity 5 soon.
     
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Is there any news on a date for Unity 5 support ?

    Also the mset.Sky errors are strange, maybe i am missing something in setup ?
     
  14. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Hello, we were testing a lot with local boxprojected skys, it seems that even with all objects in the scene set to static skyshop prevets static batching completly. Skyshop creates a material instance for every single mesh. This is a bit insane. The solution to fix this serious performance problem would be to create shared material instances for all static objects within a local sky area. The only thing that is still batched are shadows.
     
  15. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Mobile shaders seem to be quite expensive on the device still...any idea how to increase performance for all marmoset shaders at once by sacrificing quality? Any advice will be life saving as CPU and GPU both are dying but I already have no ideas where to cut. Below are some info screens:
    sky_manager.jpg Screen Shot 2015-03-13 at 6.17.09 pm.png GPU_frame.jpg


    Also when running on iPhone I get this warning
    WARNING: Shader Unsupported: 'Mobile/Diffuse' - Pass 'FORWARD' shader state not supported
    seems iOS doesn't like Mobile/Transparent/Simple Glass/Specular IBL shader any ideas?

    Any advice highly appreciated.
     
    zyzyx likes this.
  16. zyzyx

    zyzyx

    Joined:
    Jul 9, 2012
    Posts:
    227
    This is why we still use skyshop 1.6.2. The shaders are objectively faster than the 1.7+ ones.
     
  17. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Hey zyzyx,
    thank you for the info!
    I wonder where I can get older one to try. As open GL ES 2.0 runs significantly faster than 3.0 and metal doesn't work entirely. So I am not losing much by switching to earlier version. If I can still find it
     
  18. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    The earliest version I could find in our repo was 1.08 (purchased June 2014) and sadly it didn't give any performance boost. I would even say it did the opposite
     
  19. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    2 weeks and no fix? Are Marmoset leaving us out to dry?
     
  20. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    It would be good to at least hear some news, like "We're working on it."
     
  21. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Unity 5 + Skyshop
    Hey everyone! While we've been trying hard to keep up with email support and answering all the eager Unity 5 questions that have arisen since GDC, this forum thread does feel a bit neglected, sorry about that.

    Unity 5 support: we are working on it!

    This is my task at hand right now, and it is about a week away. The issues I am addressing are:
    - Vegetation shader support (something broke again after U5's final release).
    - Deprecated script issues (Auto-converting scripts is currently required, and gross but harmless warnings are everywhere).
    - Transparency issues (U5 added new #pragma flags that are now required for blending).
    - ShadersUnity5.zip needs to go away (need a cleaner way to deploy separate shaders for U4 and U5).
    - Support for U5's Deferred rendering path (Forward and Deferred Legacy work already).
    - Miscellaneous fixes that affect both U4 and U5.

    Some email support FAQs
    Q: Is Skyshop better than Unity 5 IBL?
    A: Unity 5's IBL and probe system is modeled directly after Skyshop so the two systems are functionally equivalent. (mipmapped specular probes, RGBM encoding, local skies, box projection, integration with all the standard shaders, etc). I'd say sky blending and a few other scene organization systems stand out in Skyshop, and the Marmoset materials operate a little differently than Unity's new PBR ones (U5 is matched directly to the shaders in Marmoset Toolbag 2, Skyshop is a mixed bag somewhere between Toolbag 1 and 2).

    Q: So... is Skyshop over?
    A: Skyshop will continue to be supported for both Unity 4x and in Unity 5. Plenty of people still use Unity 4, where Skyshop is the only IBL show in town. Plenty more will continue using Skyshop in U5 as they port projects over or simply as a matter of preference. However, new feature additions are not planned at this time.

    Q: When will Skyshop work in Unity 5?
    A: Right now! But you need to let the scripts get auto updated because we've kept the code backwards compatible with Unity 4x still.
    (See _ReadMeUnity5.txt for details)

    Q: Will Marmoset materials work with Unity IBL probes or vice versa?
    A: No. The two systems are pretty much independent of each other and feed data to the shader system in different ways.

    Q: My terrain and vegetation shaders are broken in Unity 5!
    A: Unzip the ShadersUnity5.zip exactly where it is located so that it overwrites terrain and vegetation shaders with U5 compatible ones. I'm working on a better deployment solution for this but this worked at least in U5 beta.
    (See _ReadMeUnity5.txt for details)

    Q: Does Skyshop work with the new WebGL target platform?
    A: Yes! But you have to use Marmoset/Mobile/ shaders. WebGL follows the OpenGL ES 2.0 spec fairly closely and has many of the same API limitations.

    Q: WebGL looks brighter than my WebPlayer build or my Unity editor window...
    A: WebGL does not support linear color space but the editor window will still render in linear if you left it enabled for a different platform. Find and set Player Settings->Color Space to Gamma and WebGL will match WebPlayer will match the editor.

    Q: Does Skyshop work with iOS Metal?
    A: I've heard it does not. I have not tested it and do not know the problems involved. It may be as easy as adding a renderer flag to a #pragma in the shaders. Or it may be an internal surface shader issue.

    Q: I'm using Skyshop 1.0 or 1.06 or 1.07 or 1.10 and it's not working!
    A: Please update to the latest build (1.11) before attempting Unity 5 or mobile work. The latest build has significant mobile shader fixes for old hardware (Notably the Galaxy S3 and other devices with Adreno and Mali 400 GPUs will start working for you).

    Q: Skyshop 1.07+ is just too slow for my project, where can I find an older build?
    A: Please contact support@marmoset.co with your invoice ID and we'll provide you a build of 1.06.2
     
  22. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Hey Monkeyscience,
    Fortunately you are back :)

    Would you mind to look into my post #2316 and give any sort of advice?
    Situation with performance of our game on the iPad is not that good and I have optimised everywhere where I could, except for the marmoset shaders.
    If you think that 1.06.2 will run faster for us, then we will e-mail you shortly

    Thank you
     
  23. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    With no new features planned it looks like it may be time to abandon ship...
     
  24. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Well, if theres no new plans for new features, would you mind pointing me in a direction or an overall view of if its possible to add to a material a slot or a script (maybe with a default if no script), to have a sky targetted using "sharedmaterial" instead of instancing a material.

    Basically i want to take the SkyAnchor script and have it change the materials sharedmaterial. For use with Indoor objects that i want to have an indoor "batched" sky. but then i want outdoors to use the "default" / outdoor sky.

    The result is, anything using the "indoor materials" will point to that sky, but everything else will use outdoor sky. I understand the indoor objects will only batch with themselves, and outdoors batch with themselves. But its better than no batching at all.

    Thank you.
     
  25. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    If there are no new features planned, it would be great to have the latest Skyshop mobile performance to be on a par with 1.06.2 if that is "the one" for mobile. At present I have moved to Unity 5, but I have a gut feeling that Skyshop should be able to deliver better performance on mobile than Unity 5 IBL + standard shader, primarily because it has been around longer.

    So for me I would like to see focus on mobile + metal support, if at all possible :)

    cheers

    Nalin
     
    OnePxl likes this.
  26. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    A nice idea would also be a Unity 5 mode, or shader replacement bundle, that would turn all current Skyshop projects to use the new dynamic sky and IBL of Unity 5 directly, maybe in an optimized way too so it would make sense to have it over Unity 5 shaders.
     
  27. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    I would be really interested to see a performance comparison here ;)
     
  28. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,363
    Indeed, this could breath a new air to the asset as well, besides the obvious perk that we wont have to change every shader manually to Unity 5 ones.
     
  29. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    I think the other thing that would help is a clear statement as to how best to use Unity 5 and Enlighten, as opposed to the old Beast Lightmapping and Lightmapping Extended. Some sample scenes would be really helpful.
     
  30. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705

    Marmoset Skyshop 1.12 Available Now!
    >> Hot off the presses at the Unity Asset Store <<
    $95


    New This Round:
    • Full Unity 5 support!
    • Support for all render paths (forward, deferred, deferred legacy)
    • Support for Enlighten lightmapping and global illumination
    • Support for new platforms (iOS Metal, WebGL*)
    • SpeedTree shaders
    • Updated TreeCreator shaders
    • Unity 5 ready Shader Forge support
    • Candela SSR support**
    • Lots of clean-up and bug fixing
    * WebGL requires use of Marmoset/Mobile shaders. The WebGL spec closely resembles GLES2.0.
    ** Livenda SSR compatibility mode is an optional #define that can be toggled in MarmosetSurf.cginc. See Documentation/Shaders.txt for more information.
     
    Last edited: Apr 10, 2015
  31. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    @monkeyscience
    does light mapping work with latest Skyshop in Unity 5?
     
  32. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    It does! Forgot to add that to the bullets. All of Enlighten lightmapping and runtime global illumination works.
     
    hopeful likes this.
  33. mozi_ru

    mozi_ru

    Joined:
    Nov 2, 2012
    Posts:
    9
    Hello, it does not seem that the deferred path is working for Bumped Diffuse Specular IBL shader or any other variant. The blue color indicates deferred (standard shader assigned), the yellow indicates forward (Marmoset shaders). See the screenshot.
    Also MarmosetDirect.cginc does not contain any functions for deferred.
    How to enable Deferred for Marmoset?
     

    Attached Files:

  34. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    I got the usual "Unity5 needs to update API commands in this asset" blablabla. Is that correct? Should I be getting update warnings when importing through the asset store in U5?
     
  35. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Skyshop requires Unity 5.0.1 (for now)

    What version of Unity 5 are you using? Skyshop's Unity 5 build was submitted using the April 1st build of Unity 5.0.1. My mac has Unity 5.0.0 and when I downloaded Skyshop, I was handed the Unity 4.3 package. This is bad! Obviously you'll get API problems and lots of shader issues as well. My mac also seems to think it's up to date when I "Check for Updates", but there is definitely a 5.0.1 build available. I'm going to see if I can't fix this.

    Which package did just download?

    To find out if your package is for Unity 4 or Unity 5, open up Marmoset/_Readme.txt. Right below Requirements you should see a paragraph that tells you which version of Unity this package is intended for:

    UNITY 4 VS. UNITY 5
    This build of Skyshop requires Unity 4 (version 4.3.4 or newer)
    For a Unity 5 compliant build, open the Asset Store window using Unity 5 and import Skyshop again.
     
  36. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    My Unity is 5.0.0f4 (check for update says I am up-to-date... o_O I am also on Mac)
    readme is confirming what you see. Appears to be the 4.3.4 or newer version.

    Going to update to U5.0.1 - thanks for the heads up on that....

    ;) I am very happy to get the Marmoset skin shader back. I like the standard shader in U5 but it is just not doing skin like Skyshop!

    Screen Shot 2015-04-10 at 5.36.24 PM.png
     
    Last edited: Apr 10, 2015
  37. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Ah. I have Unity 5.0.0f4, maybe that's why it gave me the version for Unity 4 ...?
     
  38. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    It didn't work for me,...that's why I have asked. I've baked light map and objects with marmoset shaders ignore it. Standard shader worked
     
  39. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    LateUpdate in SkyAnchor.cs has gotten worse.

    Now that I am using more objects it seems every single object, that has a skyanchor script, makes calculations every late update.

    1. These objects are not set to static by the time OnEnable is called because I color their vertices on Awake, then I batch them all together on Start. (This process is necessary for the In-App Map Builder), This causes your isStatic to get set incorrectly in OnEnable. (i will try to move this over to Start).

    2. I am not using blending, and i would love for the SkyAnchor to recognize that blending is not enabled and for LateUpdate to be wrapped in an If statement so that it doesnt try to check everything for every object in every late update, in relation to blending. (i will try to comment out blending code in lateupdate).

    Cant wait to try the update. Still using unity 4.6 until performance is "better" in 5 for low end devices (i expected only physics to be affected and to be an improvement, but rendering is not quite there yet)
     
    Last edited: Apr 12, 2015
  40. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    In order to get around these problems, it turns out that since im not using sky blending, and im just using static geometry. i had to comment out late update

    from SkyAnchor:
    in OnEnable i added
    StartCoroutine(UpdateSkyAnchor());

    then I created the method
    private IEnumerator UpdateSkyAnchor()
    {
    yield return new WaitForFixedUpdate();
    Apply();
    }

    The fixed update was just to ensure that a frame had passed for skys that get turned on at the same time as our object gets OnEnabled call.

    from SkyManager
    I created the method
    private void OnEnable() {
    StartCoroutine(UpdateSkyManager());
    }

    then I created the method
    private IEnumerator UpdateSkyManager()
    {
    yield return new WaitForFixedUpdate();
    if(firstFrame) {
    if(_GlobalSky) {
    firstFrame = false;
    _GlobalSky.Apply(0);
    _GlobalSky.Apply(1);

    if(_SkyboxMaterial) {
    _GlobalSky.Apply(_SkyboxMaterial, 0);
    _GlobalSky.Apply(_SkyboxMaterial, 1);
    }
    }
    }
    }

    This has taken SkyAnchor.LateUpdate from 15% to 0% and SkyManager.LateUpdate from 8% to 0% since they are commented out

    I hope this helps anyone who is using mobile and targeting low end devices and is not using blending.

    Also Monkey, i think this might be one of your performance issues users are talking about, when going from the previous version of SkyShop.

    A solution might be to just put a "boolean" check around everything related to Blending in the LateUpdate for those 2 scripts, and to also only do that initial apply once, after a frame has passed in OnEnable. That seems to use 1% with 40 skyanchors active when wrapped in a boolean check.

    I hope this solved a piece of the performance issues.
     
    Last edited: Apr 12, 2015
    hopeful and OnePxl like this.
  41. mozi_ru

    mozi_ru

    Joined:
    Nov 2, 2012
    Posts:
    9
    @monkeyscience
    Any comments about non-working Deferred path in Skyshop?
     
  42. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yeah, that's one of the things I'm looking into. All the shaders are written as Surface Shaders and the deferred path should work itself out. But perhaps me specifying a direct lighting function for forward and Deferred (Legacy) sets the need for a custom Deferred function as well.
     
  43. MikeR_UFG

    MikeR_UFG

    Joined:
    Dec 1, 2014
    Posts:
    12
    Has anyone noticed an issue with the very latest versions of SkyShop and Shader Forge?

    After unzipping the Marmoset extension (not the 106 version), I am getting a few errors:

    Assets/Marmoset/Skyshop/Extensions/ShaderForge/Editor/Resources/SFN_SkyshopDiff.cs(53,82): error CS1061: Type `ShaderForge.SFPSC_Lighting' does not contain a definition for `lightmapped' and no extension method `lightmapped' of type `ShaderForge.SFPSC_Lighting' could be found (are you missing a using directive or an assembly reference?)
     
  44. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    This is also related to a Skyshop version mismatch. You are using Shader Forge 1.13+ (intended for Unity 5) but have downloaded the Skyshop build intended for Unity 4, along with a ShaderForgeExtension.zip file intended for Shader Forge 1.12 and earlier.

    If you update to Unity 5.0.1, download Skyshop for Unity 5, and unzip the SF Extension zip, all should be fixed. Sorry for the chaos everyone :(.
     
  45. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Would be nice to get support, I sent a email in with no reply, been having an issue on and off for weeks now. this is not a hobby, so it would be great to find out why grass, trees are black..I deleted this asset and its fine..I need to use this asset so some support would be great, growing inpatient here,. ..
     
  46. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Is it just me or has anyone else noticed that SpecularSharpness minimum value is 2?

    Seems to be a bug here that I cannot drag it to 0?

    N

    Screen Shot 2015-04-16 at 14.03.08.png
     

    Attached Files:

  47. latencio

    latencio

    Joined:
    Feb 9, 2015
    Posts:
    2
    Hi,

    Having troubles with Shader Forge compatibility. I'm using Shader Forge 1.13 and the latest Skyshop update, and when I extract the Extension package Unity displays this error.

    Assets/Marmoset/Skyshop/Extensions/ShaderForge/Editor/Resources/SFN_SkyshopDiff.cs(53,82): error CS1061: Type `ShaderForge.SFPSC_Lighting' does not contain a definition for `lightmapped' and no extension method `lightmapped' of type `ShaderForge.SFPSC_Lighting' could be found (are you missing a using directive or an assembly reference?)


    (Can't upload screen).

    I can't use the diff ambient light node from Skyshop in Shader Forge.

    Thanks
     
  48. Hedonsoft

    Hedonsoft

    Joined:
    Jul 11, 2012
    Posts:
    168
    Hi.

    Learning my way around Skyshop. Am I able to use a conventional Unity Skybox with Skyshop? I've found the panoramas that come with it look strange in my scene as I only want a plain sky, no buildings or trees. I own AllSky, is there a way to use those skies with Skyshop?
     
  49. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    65
    We're using Skyshop, but we want to use NON-LEGACY Unity5 Deferred Shading as well, and I guess right now Skyshop doesn't fully support that? What is the meaning of the update notes saying it supports Unity5 Deferred then?
     
  50. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    65
    OK, I *think* I got marmoset actually supporting DeferredShading. I can confirm this makes it actually deferred in Deferred mode (NOT legacy), but I'm not 100% sure it's correct. I did it by adding this to the bottom of MarmosetDirect.cginc:

    //----------------------------------------
    // BEGIN UWE
    // Steve: as of 112, skyshop didn't actually have a _Deferred function.
    //----------------------------------------
    //deferred shading
    inline half4 LightingMarmosetDirect_Deferred (MarmosetOutput s, half3 viewDir, UnityGI gi, out half4 outDiffuseOcclusion, out half4 outSpecSmoothness, out half4 outNormal)
    {
    outDiffuseOcclusion = float4( s.Albedo, 1.0 );
    #ifdef MARMO_SPECULAR_DIRECT
    outSpecSmoothness = half4(s.SpecularRGB, s.Specular);
    #else
    outSpecSmoothness = half4(_SpecColor, s.Specular);
    #endif
    outNormal = half4(s.Normal * 0.5 + 0.5, 1);
    half4 emission = half4(s.Emission, 1);

    return emission;
    }
    inline void LightingMarmosetDirect_GI (
    MarmosetOutput s,
    UnityGIInput data,
    inout UnityGI gi)
    {
    gi = UnityGlobalIllumination (
    data,
    1.0,
    0 /* not used with reflections=false anyway */,
    s.Normal,
    false);
    }

    // I guess for some reason, even the forward function needs to use the new signatures
    inline half4 LightingMarmosetDirect( MarmosetOutput s, half3 viewDir, UnityGI gi )
    {
    // Pretty sure attent is applied in LightingMarmosetDirect_GI, so we can pass atten=1 here.
    return LightingMarmosetDirect( s, gi.light.dir, viewDir, 1.0 );
    }
    //----------------------------------------
    // END UWE
    //----------------------------------------
     
    monkeyscience likes this.
Thread Status:
Not open for further replies.