Search Unity

Standard Double Sided Shaders

Discussion in 'Assets and Asset Store' started by username_unity_of_my, Jul 29, 2015.

  1. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    Hmmm, I just checked 5.6.1 and ds standard shaders work fine ( Imported from 5.6.0f3 version )
    That line you changed need to be AdditiveLight( IN_LIGHTDIR_FWDADD(i), LIGHT_ATTENUATION(i)); in StandardDSCoreForward.cginc for additional light pass. You can look in built in shaders for 5.6.1f1.
    What error does it display?
    Have you tried creating new project with default settings and importing again?

    I just submitted update to fix shadows for two face cutout shaders.
     
  2. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
  3. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    If post processing effect has its own depth pass ( or any other ), it must implement double sidedness also or it will not detect backfaces.
    EDIT: If I remember correctly, I once used SSAOcclusion which did not detect backfaces but SSAObscurance did .
     
    tomekkie2 likes this.
  4. jtrunyon

    jtrunyon

    Joined:
    Sep 1, 2017
    Posts:
    1
    Just upgraded to Unity 5.6.3 p1 and the StandardDoubleSided shader is not working
     
  5. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    I tried it on 5.6.3 and it works fine, also I tried it by downloading from AssetStore and it also works fine, I tried it on Unity 2017.1 and also works fine.
    Can you tell me what are the errors?
    If you used older versions of DS shaders and imported into new unity version it will not work of course. You have to download new version of DS shaders also.

    Is there anybody else that is having problems on 5.6.3?
     
    Last edited: Sep 10, 2017
  6. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Is this asset works with lightmapping? double sided lightmapping?
     
  7. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    I think double sidedness is irrelevant with baking lighting. You can place two quads opposite of eachother or place two meshes one cull front other cull back - than bake. After you bake you can remove other side meshes.
     
    Last edited: Nov 6, 2017
  8. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    @username_unity_of_my Hi, in Unity 2017.2p1 unity will not build if it finds shaders with errors in them., So your shaders are stopping us from build project. Please have a look asap
     
  9. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    I just tried on 2017.2f3 which is the one latest from download page and it woks fine. I build it for android without any errors.
    I'll download Unity 2017.2p1 to test and get back to you.
     
    Last edited: Nov 23, 2017
  10. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I build for Windows x64 does not work. If I exclude the shader it works 2017.2p1 (Its newer than f3)
     
  11. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Just to say that standard shaders for Unity 2017.2p1 have changed and I'll release update soon.
     
  12. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Update is released.
     
  13. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I have the same problem, I sent you a message. Now all of my materials are pink.
     
    kenshin likes this.
  14. Frigid

    Frigid

    Joined:
    Jan 31, 2014
    Posts:
    3
    I changed the type of light source (from directional to spot\point light) and the shadows were gone.
    Is that the way it should be, or am I doing something wrong?

     
  15. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    That is legacy shader right?
    Mobile, legacy, two face ( surface ) work same as Unity equivalents
    If you want to enable point/spot lights in forward rendering path - add 'fullforwardshadows' pragma directive ( instead of noforwardadd)
    And, of course, expect it to be somewhat more perfomance costly.
     
    Last edited: Jul 22, 2018
  16. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    Hey there! I just got this asset and it's awesome that it can light the backside of double-sided planes!

    Ran into a snag with making country flags though, is it possible to have a shader that will mirror the backside face texture?

    Ideally you can provide one texture and it will display the backface mirrored to save on memory.

    Front (Correct)
    upload_2018-9-21_18-55-10.png

    Back (Incorrect)

    upload_2018-9-21_18-55-46.png

    However when I create a mirrored texture it works correctly
    upload_2018-9-21_18-56-16.png

    Forgive me if this is super easy to do in the shader file, I normally use Amplify for shader editing!
    Cheers

    EDIT:
    Just added this to the surfDS function in TwoFaceTextureDiffuse.shader and it works for the time being:
    IN.uv_SecTex.x = 1 - IN.uv_SecTex.x;
     
    Last edited: Sep 22, 2018
  17. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    Hello,
    thanks for your asset, it's a really missing one.

    but i have a problem and i don't understand why..
    yesterday i was using it for the first time in my project and standard shader was working perfectly.
    Today i re open my project and i get this error message:

    Shader error in 'DoubleSided/Standard/Standard DS (Roughness setup)': invalid subscript 'fogCoord' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on d3d11)

    Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH FOG_EXP2 _NORMALMAP _METALLICGLOSSMAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

    after that i updated unity to 2018.2.9f1 but the problem is still there.


    Edit:
    Just few minutes after that, i imported another character which also need to use 2sided shader,
    But this time i used specular because i know the first is broken...

    And this is really strange because it works on my screen, but the console says the opposite, so maybe after a restart i will not have it to work normally...

    Code (CSharp):
    1. Shader error in 'DoubleSided/Standard/Standard DS (Specular setup)': invalid subscript 'fogCoord' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on d3d11)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH FOG_EXP2 _NORMALMAP _ALPHATEST_ON
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
    Code (CSharp):
    1. Shader error in 'DoubleSided/Standard/Standard DS': invalid subscript 'fogCoord' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on d3d11)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH FOG_EXP2 _NORMALMAP _ALPHATEST_ON
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
    Code (CSharp):
    1. ArgumentException: Getting control 26's position in a group with only 26 controls when doing Repaint
    2. Aborting
    3. UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/Modules/IMGUI/LayoutGroup.cs:117)
    4. UnityEngine.GUILayoutUtility.DoGetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:461)
    5. UnityEngine.GUILayoutUtility.GetRect (Single minWidth, Single maxWidth, Single minHeight, Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:450)
    6. UnityEditor.EditorGUILayout.GetControlRect (Boolean hasLabel, Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:8803)
    7. UnityEditor.MaterialEditor.PropertiesDefaultGUI (UnityEditor.MaterialProperty[] props) (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1629)
    8. UnityEditor.MaterialEditor.PropertiesGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1582)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     

    Attached Files:

    Last edited: Sep 25, 2018
  18. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    I see that they changed some standard shaders code for 2018.2.
    I submitted update for 2018.2.1 version
     
    Last edited: Sep 25, 2018
    blackant likes this.
  19. kimyoungk

    kimyoungk

    Joined:
    Oct 3, 2018
    Posts:
    1
    Hello, I am having trouble importing your current release Double Side Shader v3.5 to Unity2018.1.9.f2.
    It imports fine with Unity2018.2.11.f1, but I have to use earlier version of Unity (2018.1.9.f2) to make asset bundles.

    Is there a way to get the older version of your Double Side Shader that works with Unity2018.1.9?
    Becasue I need to use "DoubleSided/Other/Standard DS" & "DoubleSided/Other/Standard DS(Specular setup)" but both of them showing error when I imported to Unity2018.1.9
    Thank you

    ErrorLog.png
     
    Last edited: Oct 5, 2018
  20. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    If you are using newer version then it wont work because Unity change standard shaders code for version 2018.2.
    Try to import older version. Open Unity v2017.1 and import package again.
     
    Last edited: Oct 7, 2018
  21. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    I'm using 5.6.5 and I'm getting the following error with the standard double sided shader ....

    Shader error in 'DoubleSided/Standard/StandardDoubleSided': invalid subscript '_LightCoord' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(143) (on d3d11)
     
  22. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Hi,
    First: I hope you downloaded shaders version with Unity version you are using because standard shaders are different for most Unity versions. Coping shaders from version to version dont work.
    Second: Can you contact me on email please ?
     
  23. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    yes I downloaded with the version I am using - the same error comes out on both PC and my Mac. I will try to find your email.
     
  24. grogshotgames

    grogshotgames

    Joined:
    Aug 6, 2015
    Posts:
    77
    Hello,

    I just updated to the latest version, which you say it's compatible with 2018.2.1.
    I have 2018.2.10 and when compiling I'm having the following errors:

    Code (CSharp):
    1. Shader error in 'DoubleSided/Standard/StandardSpecularDoubleSided': 'fogCoord' :  no such field in structure; 'x' :  no such field in structure; 'saturate' : cannot resolve function call unambiguously (check parameter types) at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(125) (on gles)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL FOG_LINEAR
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    5. (Filename: Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc Line: 125)
    6.  
    7. WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
    8. WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
    9. WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
    10. WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
    11. Compiled shader 'DoubleSided/Standard/StandardDoubleSided' in 20.76s
    12.     gles (total internal programs: 1100, unique: 386)
    13.     gles3 (total internal programs: 1100, unique: 386)
    14. Shader error in 'DoubleSided/Standard/StandardDoubleSided': 'fogCoord' :  no such field in structure; 'x' :  no such field in structure; 'saturate' : cannot resolve function call unambiguously (check parameter types) at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on gles)
    15.  
    16. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL FOG_LINEAR
    17. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    18. (Filename: Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc Line: 105)
    19.  
    20. Shader error in 'DoubleSided/Standard/StandardDoubleSided': invalid subscript 'fogCoord' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on gles3)
    21.  
    22. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL FOG_LINEAR
    23. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    24. (Filename: Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc Line: 105)
    25.  
    26. Shader error in 'DoubleSided/Standard/StandardDoubleSided': 'fogCoord' :  no such field in structure; 'x' :  no such field in structure; 'saturate' : cannot resolve function call unambiguously (check parameter types) at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(125) (on gles)
    27.  
    28. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL FOG_LINEAR
    29. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    30. (Filename: Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc Line: 125)
    I didn't do a clean update, should I?
     
  25. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Hmmm, I cannot replicate error.
    Everything is in order on me 2018.2.1
    Can you send me email? -
     
  26. grogshotgames

    grogshotgames

    Joined:
    Aug 6, 2015
    Posts:
    77
    I can confirm this was caused due to duplicated files when updating it. I cleanly installed the asset and it's not throwing errors now.

    EDIT: No, it's not. I'm sending you an email.

    EDIT 2: After mailing back and forward with @username_unity_of_my we weren't able to find the issue. But I just learned the hard way. Assets can be uploaded for a specific Unity version to download.
    Since we first downloaded the asset in a Unity 2017 version, the last one uploaded didn't download.
    Downloading the asset again in a Unity 2018 version did the trick and it's working correctly now.
     
    Last edited: Dec 12, 2018
  27. Frigid

    Frigid

    Joined:
    Jan 31, 2014
    Posts:
    3
    Is it possible to change aRGB values via editor? I'm trying to make a semi-transparent sprite but the color values are simply ignored.
     
  28. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Your standard double sided shader works fine until my character nears a unity point light attached to a campfire.
    Note: I am also under a directional light (sun), but the bright effect from the campfire point light does not appear with the unity standard shader, only with the standard double sided shader.



    DS shader.PNG
     
  29. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    You can try one of transparent shader versions if original standard DS version doesn't suit you.
     
    wood333 likes this.
  30. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    Do you use and post process effects ?
    In package demo ( with red tent ) there are directional and point light in scene and all the shaders are double sided.
     
  31. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thank you for your suggestions. No, I am not using post processing. I may try the other double sided shaders over the weekend. Our current plan is to add more back side mesh and use unity standard shader. We don't have much time here to experiment and figure things out (me and one part timer). We usually pick a certain path quickly, and move on. I tried the double sided shaders because I already owned them.
     
  32. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    The double sided legacy shader bumped diffuse works. The standard shader has more options, but something in your double sided version over-reacts to the point light on my campfire. This point light I use is standard unity. I am in 5.6.6f2. The light is set bright enough to cast shadows at night, even under a unistorm moon. In comparison with the unity standard shader the double sided standard shader reflects the point light in almost an electric effect, as depicted in my original post.

    The double sided legacy shader is a good option for the present. Future items worn by the PC or NPC will be designed with additional mesh, which renders the issue moot.

    As always, thank you for your input and contributions to the Unity community.
     
    Last edited: Jan 14, 2019
  33. Christin2015

    Christin2015

    Joined:
    Dec 1, 2015
    Posts:
    48
    Hi @username_unity_of_my , I have just found your asset in the store and would be interested especially in the shader "mobile bumped specular 1 directional light". Does the current package work in Unity 2018.3? And are there any GPU (iOS and Android) which do not render this shader as expected?
     
  34. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    It works in 2018.3 .
    If you are using IOS - make sure you use OpenglES and not Metal.
    There were issues on Metal.
    Maybe those were fixed by now though..
     
  35. Christin2015

    Christin2015

    Joined:
    Dec 1, 2015
    Posts:
    48
  36. casuallynoted

    casuallynoted

    Joined:
    Jan 7, 2015
    Posts:
    5
    I'm having an issue using the DS Shaders in Unity 2017.4.28f1:

    Shader error in 'DoubleSided/Standard/Standard DS (Specular setup)': undeclared identifier 'UNITY_EXTRACT_FOG_FROM_EYE_VEC' at Assets/_DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(110) (on d3d11)

    Is there any way to fix this? It's weird because I've been using this shader in 2017 for some time with no issues
     
  37. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Hmm, did you try to reload ?
    Have you changed 2017 versions ?
    Try to use, maybe, DS shaders from version 2018 ( one higher up version ).
    Maybe in 2017.4 they already changed shaders to 2018 version
     
  38. casuallynoted

    casuallynoted

    Joined:
    Jan 7, 2015
    Posts:
    5
    This is with the most up-to-date package, oddly enough my other projects that use the older version of the shaders seem to be working correctly
     
  39. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    What i meant was, try to use Unity version 2018 ( first one ) do download DS shaders and use them on Unity 2017.4.
    Maybe Unity 2017.4 already is using Standard shaders versions from Unity 2018 and up.
     
  40. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    429
    HI @username_unity_of_my Nice shader pack thank you.
    For info, on Unity 2018.4.18 LTS I'm getting a compilation error from one of the shaders, after importing. It's an Android (VR) project. Forward rendering.

    Shader error in 'DoubleSided/Other/SpriteStandard': Did not find shader kernel 'fragAddDS' to compile (on d3d11)

    Compiling Fragment program with UNITY_PASS_FORWARDADD DIRECTIONAL FOG_LINEAR _NORMALMAP
    Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_DESKTOP UNITY_LIGHTMAP_DLDR_ENCODING


    Shader error in 'DoubleSided/Other/SpriteStandard': Did not find shader kernel 'fragBaseDS' to compile (on d3d11)

    Compiling Fragment program with UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH FOG_LINEAR _EMISSION _NORMALMAP
    Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_DESKTOP UNITY_LIGHTMAP_DLDR_ENCODING

    it's not a shader I need so deleting it is fine for me, but thought you might want to know.
     
  41. kuirp

    kuirp

    Joined:
    Mar 8, 2015
    Posts:
    2
    Hello!
    Does your shader have support for metal rough(unity 2019.3)?
     
    Last edited: Apr 6, 2020
  42. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Hi,
    Yes, it supports Standard, Autodesk Interactive ( roughness ) and Standard Specular.
     
  43. kuirp

    kuirp

    Joined:
    Mar 8, 2015
    Posts:
    2
    Really nice!

    Just bought an asset, import into project, replace shader to double sided and nothing missed!

    The only problem is - my height map make backface texture glitchy on certain angles
    So my front is:
    front.jpg
    But back is:
    back.jpg

    I can delete heightmap and it fixed, but material lose its bumpiness:(
    Shader is "DoubleSided/Standart/Standart DS"
     
    Last edited: Apr 20, 2020
  44. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330

    Ok, I'll take a look at the height map. ( Unity 2019.3 )
     
  45. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Hello, I'm using this as a shader for wow models, as wow renders transparent objects like tress with either diffuse double sided or vetex lit double sided.

    In this case, I'm trying to use vertex lit shader and just a standard double sided transparent cutoff image. I didn't find an exact match however "VertexLitCullCutoff" was close. On the front of my objects it looks great:


    But on the back of the face, it does not render correctly:


    Can you include just a regular vertex lit double sided alpha cutoff shader?

    DoubleSided/Legacy Shaders/Cutout/VertexLit

    Maybe expose the main color parameter so the final color can be modified?
     
  46. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
    can you also do a double sided occluder shader?
    one that will hide other 3d objects placed behind it and be invisible?
     
  47. Schwalbe

    Schwalbe

    Joined:
    Jun 19, 2017
    Posts:
    6
    Hello @username_unity_of_my .

    I didn't notice that mentioned, b u t: upload_2021-6-11_9-51-43.png

    This comes from:
    https://github.com/TwoTailsGames/Un...lob/master/CGIncludes/UnityStandardCore.cginc

    Perhaps my team didn't update the asset or something (just started working here, I wouldn't know), but I was one of those who had the issue with shader failing at fogCoord - what helped was replacing calls to VertexOutputForwardBase.fogCoord with it's eyeVec.

    Letting you know, because although that change helped, I am unsure if that is the correct reasoning and solution.

    Unity's Error logs for reference:

    Shader error in 'DoubleSided/Standard/StandardDoubleSided': invalid subscript 'fogCoord' at Assets/_External/DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on d3d11)

    Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH FOG_EXP2 INSTANCING_ON _METALLICGLOSSMAP _NORMALMAP _PARALLAXMAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PASS_FORWARDBASE
    Disabled keywords: _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _EMISSION _DETAIL_MULX2 _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _SPECULARHIGHLIGHTS_OFF _GLOSSYREFLECTIONS_OFF FOG_LINEAR FOG_EXP SHADOWS_SHADOWMASK DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING DIRLIGHTMAP_COMBINED VERTEXLIGHT_ON UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30


    Shader error in 'DoubleSided/Standard/Standard DS': invalid subscript 'fogCoord' at Assets/_External/DoubleSidedShaders/Shaders/DoubleSided/Standard/StandardDSCoreForward.cginc(105) (on d3d11)

    Compiling Fragment program with DIRECTIONAL FOG_EXP2 _ALPHATEST_ON _NORMALMAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PASS_FORWARDADD
    Disabled keywords: _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _METALLICGLOSSMAP _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _SPECULARHIGHLIGHTS_OFF _DETAIL_MULX2 _PARALLAXMAP FOG_LINEAR FOG_EXP POINT SPOT POINT_COOKIE DIRECTIONAL_COOKIE SHADOWS_SHADOWMASK LIGHTMAP_SHADOW_MIXING SHADOWS_DEPTH SHADOWS_SOFT SHADOWS_SCREEN SHADOWS_CUBE UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30
     
  48. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    58
    Hi..I am a mobile gamedev and in need of a doubleside material and recently just purchased ur product. But after installation i get this error on Unity 2020.3.25f1.Kindly help

    Assets\_DoubleSidedShaders\Script\FPSCounter.cs(6,18): error CS0101: The namespace 'UnityStandardAssets.Utility' already contains a definition for 'FPSCounter'
     
  49. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    You can remove FPSCounter script - it's just used on some demo scenes.
     
  50. WilliamLinOuO

    WilliamLinOuO

    Joined:
    Mar 31, 2022
    Posts:
    10
    Hello, thank you so much for the amazing asset!

    I encounter some problems when applying the material. After I applied the material(a custom render texture capturing the camera's view) to the plane and select the shader to be StandardDS. Only one side has the image while the other side is dark. But when I turn the plane 180 degrees, the other side actually has the image but the first side becomes dark again. I wonder why this happens and how should I fix it?

    In the attached screenshots, the first two show it has the image on one side but dark on the other side. After I turn the plane for 180, the previously dark side actually has the image, shown by the last two screenshots.

    Thank you so much for your time and consideration!

    FIXED:
    It's the lighting problem, from one direction, there is no light hit the plane so the plane just appears to be black.
     

    Attached Files:

    Last edited: Jun 2, 2022