Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

❤️ ShaderlabVSCode - VSCode extensions for Unity Shaderlab programming

Discussion in 'Assets and Asset Store' started by Amlovey, Jul 7, 2017.

  1. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    facebook.png
    Purchase From Asset Store | Purchase From MianBaoDuo (China Only) | Free Version | Documents | Email

    ShaderlabVSCode is a Visual Studio Code extension for Unity Shaderlab programming.

    A preview video see below.



    Asset Store
    https://assetstore.unity.com/packages/tools/utilities/shaderlabvscode-94653

    Or purchase from MianBaoDuo (China Only) with lower price.

    Key Feathers
    1. Syntax Highlighting
    2. Code Completion and Basic Intellisense
    3. Hover Information
    4. Signature Help
    5. Go To Definition
    6. Code Snippets
    7. Document Format
    8. SRP supports

    Image Previw
    a733s-tc3nv.jpg






    Any issues or questions, welcome to send email to amlovey@qq.com
     
    Last edited: Jan 13, 2021
  2. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Beta 1 is available on Unity Asset Store now
     
  3. JPBotelho

    JPBotelho

    Joined:
    May 22, 2016
    Posts:
    205
    Would this work with VS 2015 Community?
     
  4. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    @NoobStudios Not supports Visual Studio for now. I will publish Visual Stuido plugin in future depends on how this assets going on Unity Assets Store.
     
  5. JPBotelho

    JPBotelho

    Joined:
    May 22, 2016
    Posts:
    205
    Aww, that sucks. I really needed this to work on both Code and VS.
     
  6. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
  7. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Beta2 with snippets support is available on Asset Store now
     
  8. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    V1.0.3 is available on Asset Store now
     
  9. GreenMartian

    GreenMartian

    Joined:
    Aug 4, 2015
    Posts:
    1
    看起来不错,便宜点就好了,我等等看看有没有降价或打折活动
     
  10. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    V1.0.5 with Region mark support is available on Asset Store. BTW One Week Sales will end in few days.
     
  11. LastMonopoly

    LastMonopoly

    Joined:
    Jan 31, 2017
    Posts:
    4
    Bug report on document format :

    Before format:
    #pragma surface surf Lambert vertex:vert​
    After format:
    #pragma surface surf Lambert vertex: vert​

    Formatted version causes shader compile error, plz fix that asap.
     
  12. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Thank you for details. I will fix it ASAP.
     
  13. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    V1.0.6 with fix of Document Format is available on Asset Store now.
     
  14. SteeLMan

    SteeLMan

    Joined:
    Jul 2, 2015
    Posts:
    5
    Hello! I recently use your extension for visual studio code, I really like it. But I noticed one bug, with several document formatting, indentation after #if, #endif and so on.
    Also, the formatting inside the structures leads to alignment with the variables, I would like to see

    #if defined(_RENDERING_CUTOUT)
    clip(alpha - _AlphaCutoff);
    #endif

    but not

    #if defined (_RENDERING_CUTOUT)
    clip (alpha - _AlphaCutoff);
    #endif

    Thank you for the wonderful extension!

    PS. Sorry for my bad English.
     
  15. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Hi,

    Would you mind send a email to me? I have do some improvement today, I think I have fix it. I will send you the new package. Thank you!
     
  16. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    v1.1.0 with .hlsl and .cg file support is available on Asset Store now
     
  17. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    20% OFF SALE for Spring Festival of China
     
  18. lyons1005

    lyons1005

    Joined:
    Nov 3, 2010
    Posts:
    10
    Asset Store claims there was an update to 1.1.4 but I can't seem to import anything above 1.1.2?
     
  19. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    I'm not sure what happen to Asset Store. Did you try to delete the local copy of ShaderlabVSCode and download from Asset Store again?
     
  20. lyons1005

    lyons1005

    Joined:
    Nov 3, 2010
    Posts:
    10
    Deleting it from my project worked, thanks.
     
    Amlovey likes this.
  21. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    ShaderlabVSCode is on 40% OFF sales now.
     
  22. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Sales will be end in next few days.
     
  23. PuzzledBoy

    PuzzledBoy

    Joined:
    Sep 9, 2014
    Posts:
    23
    Greate help!
     
  24. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    139
    @Amlovey ,
    Before I buy the asset, I've got a few questions about it:

    1. Does it inspect included files? I.e., will it suggest functions for autocompletion if I have those declared in an external ".cginc" / ".hlsl" file which is included:
    a) from the same folder, with
    Code (CSharp):
    1. #include "file.hlsl"
    b) from any other folder, with
    Code (CSharp):
    1. #include "Assets/path/to/file.hlsl"
    2. #include "Packages/path/to/shader/library.hlsl"
    2. Does this plugin support new SRP-style shaders (for URP/HDRP)?
    I.e., detecting included files from packages (as in example above), parsing HLSLPROGRAM block, support for texture samplers declaration, pass names/tags suggestion ("LightMode"="UniversalForward"), etc.

    3. Is it possible to customize code style? Specifically, tabs instead of spaces (for indents), brackets positioning (end of line / new line - for structs/funcs/pass blocks).
     
    Last edited: Feb 14, 2020
  25. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Hi

    Thank you for your post.

    For #1, it works for same folder and relative path base on the shader file folder.
    For #2, Not support for now. But I can add it for later release.
    For #3, Not full support now. No brackets positioning options..but have indents feature which base on VSCode Settings.
     
  26. Lex-DRL

    Lex-DRL

    Joined:
    Oct 10, 2011
    Posts:
    139
    @Amlovey
    Thanks for the reply.

    Unfortunately, 1.b (including files by the full path based on the project root, not relatively to the shader) and 2 (SRP support, at least for HLSL part) are two things that I absolutely need.

    The plugin itself looks great. Would love to see the updated version with these 2 features added.
     
  27. gam0022

    gam0022

    Joined:
    Dec 24, 2017
    Posts:
    2
    Thank you for the great extension!

    I would appreciate it if you could fix the code format issue.

    Before format:

    Code (CSharp):
    1.  
    2. float test()
    3. {
    4.     if (1 == 1)
    5.     {
    6.         float a = 1;
    7.     }
    8.  
    9.     if (2 == 2)
    10.     {
    11.         float b = 2;
    12.     }
    13.  
    14.     return 0;
    15. }
    16.  
    After format: The white space after the second if statement disappears.

    Code (CSharp):
    1.  
    2. float test()
    3. {
    4.     if (1 == 1)
    5.     {
    6.         float a = 1;
    7.     }
    8.  
    9.     if(2 == 2)
    10.     {
    11.         float b = 2;
    12.     }
    13.  
    14.     return 0;
    15. }
    16.  
     
  28. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    I will fix it in next release, Thank you for feedback.
     
  29. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    From Version 1.2.2, ShaderlabVSCode supports builtin CGInclude files in Unity Editor application and the version is already available on Asset Store now.
     
  30. gam0022

    gam0022

    Joined:
    Dec 24, 2017
    Posts:
    2
    > After format: The white space after the second if statement disappears.
    This issue was fixed in 1.2.2! Thank you for the fix!

    I found another new issue with the format.

    Before format:

    Code (CSharp):
    1. float test()
    2. {
    3.     for (int i = 0; i < 10; i++)
    4.     {
    5.         // do something
    6.     }
    7.  
    8.     return 0;
    9. }
    After format: A space is inserted before ++.

    Code (CSharp):
    1. float test()
    2. {
    3.     for (int i = 0; i < 10; i ++)
    4.     {
    5.         // do something
    6.     }
    7.  
    8.     return 0;
    9. }
     
    Amlovey likes this.
  31. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Thank you very much for feedback. I have already fix it in my side. Would you mind drop an email to amlovey@qq.com. I can send you the latest packages via email.
     
  32. hacozac

    hacozac

    Joined:
    May 15, 2014
    Posts:
    2
    Thanks for the great plugin.
    I don't want to put a line break before the curly brackets "{".
    I want to set whether or not to start a new line.
     
    Last edited: Dec 30, 2020
  33. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    I think I can add a setting item to config whether start a new line or not. I will add it in next release.
     
  34. hacozac

    hacozac

    Joined:
    May 15, 2014
    Posts:
    2
    Thank you!
     
  35. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Hi @hacozac , new version v1.2.3 is available on asset store. The new formatting setting item is added. Uncheck the setting item will not place open brace on new line
    settings.png
     
    hacozac likes this.
  36. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Version 1.2.4 will be submitted to Asset Store in next few days. Two main improvements in new release

    1. `Go To Definition` works for methods/variables/structs



    2. Hover information support variable type information

    upload_2021-1-13_10-50-41.png
     
  37. Amlovey

    Amlovey

    Joined:
    May 10, 2016
    Posts:
    217
    Version 1.2.4 is available on Asset Store already.
     
unityunity