A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files

Overview

HLSL Tools for Visual Studio Join the chat at https://gitter.im/tgjones/HlslTools Build Status

This extension is for Visual Studio 2017 / 2019. Go here for the Visual Studio Code extension.

HLSL Tools is a Visual Studio 2017 / 2019 extension that provides enhanced support for editing High Level Shading Language (HLSL) files.

Download the extension at the Visual Studio Marketplace.

See the changelog for changes.

Why use HLSL Tools?

Since Visual Studio 2012, Visual Studio has shipped with basic support for editing HLSL files. In addition to that basic feature set, HLSL Tools includes many more navigational and editing features:

VS2017 / VS2019 VS2017 / VS2019 with HLSL Tools
Syntax highlighting Syntax highlighting
Automatic formatting Automatic formatting
Brace matching Brace matching
Brace completion Brace completion
Outlining Outlining
Statement completion
Signature help
Reference highlighting
Navigation bar
Navigate to (Ctrl+,)
Live errors
Go to definition
Quick info
Gray out code excluded by preprocessor
HLSL-specific preferences

There are more features on the roadmap.

Features

Statement completion

Just start typing, and HLSL Tools will show you a list of the available symbols (variables, functions, etc.) at that location. You can manually trigger this with the usual shortcuts: Ctrl+J, Ctrl+Space, etc.

Statement completion demo

Signature help

Signature help (a.k.a. parameter info) shows you all the overloads for a function call, along with information (from MSDN) about the function, its parameters, and return types. Typing an open parenthesis will trigger statement completion, as will the standard Ctrl+Shift+Space shortcut. Signature help is available for all HLSL functions and methods, including the older tex2D-style texture sampling functions, and the newer Texture2D.Sample-style methods.

Signature help demo

Reference highlighting

Placing the cursor within a symbol (local variable, function name, etc.) will cause all references to that symbol to be highlighted. Navigate between references using Ctrl+Shift+Up and Ctrl+Shift+Down.

Reference highlighting demo

Navigation bar

Navigation bar demo

Navigate To

HLSL Tools supports Visual Studio's Navigate To feature. Activate it with Ctrl+,, and start typing the name of the variable, function, or other symbol that you want to find.

Navigate To demo

Live errors

HLSL Tools shows you syntax and semantic errors immediately. No need to wait till compilation! Errors are shown as squigglies and in the error list.

Live errors demo

Go to definition

Press F12 to go to a symbol definition. Go to definition works for variables, fields, functions, classes, macros, and more.

Go to definition demo

Quick info

Hover over almost anything (variable, field, function call, macro, semantic, type, etc.) to see a Quick Info tooltip.

Quick info demo

Preprocessor support

HLSL Tools evaluates preprocessor directives as it parses your code, and grays out excluded code. If you want to make a code block visible to, or hidden from, HLSL Tools, use the __INTELLISENSE__ macro:

INTELLISENSE macro demo

Options

Configure HLSL-specific IntelliSense and formatting options. If you really want to, you can disable IntelliSense altogether and just use HLSL Tools' other features. You can also set HLSL-specific highlighting colours in Tools > Options > Environment > Fonts and Colors.

Options demo

Extras

The code

HLSL Tools includes a handwritten HLSL parser. It initially used an ANTLR lexer and parser, but the handwritten version was faster, and offered better error recovery.

HLSL Tools has a reasonable test suite - although it can certainly be improved. Amongst more granular tests, it includes a suite of 433 shaders, including all of the shaders from the DirectX and Nvidia SDKs. If you want to contribute gnarly source files which push HLSL to its limit, that would be great!

Syntax visualizer

Inspired by Roslyn, HLSL Tools includes a syntax visualizer. It's primarily of interest to HLSL Tools developers, but may be of interest to language nerds, so it's included in the main extension. Open it using View > Other Windows > HLSL Syntax Visualizer.

Syntax visualizer demo

Custom preprocessor definitions and additional include directories

HLSL Tools has a built-in preprocessor to handle #define and #include directives. The behavior of this preprocessor can be customised by creating a file named shadertoolsconfig.json:

{
  "hlsl.preprocessorDefinitions": {
    "MY_PREPROCESSOR_DEFINE_1": "Foo",
    "MY_PREPROCESSOR_DEFINE_2": 1
  },
  "hlsl.additionalIncludeDirectories": [
    "C:\\Code\\MyDirectoryA",
    "C:\\Code\\MyDirectoryB",
    ".",
    "..\\RelativeDirectory"
  ],
  "hlsl.virtualDirectoryMappings": {
    "/Project": "C:\\MyProject\\Shaders"
  }
}
  • hlsl.preprocessorDefinitions: It's normal for additional preprocessor definitions to be defined as part of a project build. In some cases, the shader won't compile correcty without these. To handle this, you can add those additional preprocessor definitions here.
  • hlsl.additionalIncludeDirectories: HLSL Tools will, by default, only use the directory containing the source file to search for #include files. Additional include directories can be added here.
  • hlsl.virtualDirectoryMappings: Use this to configure the virtual directory mappings required by Unreal Engine. The virtual directory (/Project in the example above) must start with a forward slash or backslash.

HLSL Tools will look for a file named shadertoolsconfig.json in the directory of an opened file, and in every parent directory. A search for shadertoolsconfig.json files will stop when the drive root is reached or a shadertoolsconfig.json file with "root": true is found. If multiple config files are found during this search, they will be combined, with properties in closer files taking precedence.

Config files are cached for performance reasons. If you make make changes to a config file, you'll need to close and re-open any source files that use that config file.

Getting involved

You can ask questions in our Gitter room. If you find a bug or want to request a feature, create an issue here . You can find me on Twitter at @_tim_jones_ and I tweet about HLSL Tools using the #hlsltools hashtag.

Contributions are always welcome. Please read the contributing guide first.

Maintainer(s)

Acknowledgements

  • Much of the code structure, and some of the actual code, comes from Roslyn.
  • NQuery-vnext is a nice example of a simplified Roslyn-style API, and HLSL Tools borrows some of its ideas and code.
  • Node.js Tools for Visual Studio and Python Tools for Visual Studio are amongst the best examples of how to build a language service for Visual Studio, and were a great help.
  • ScriptSharp is one of the older open-source .NET-related compilers, and is still a great example of how to structure a compiler.
  • LangSvcV2 includes many nice abstractions for some of the more complicated parts of Visual Studio's language service support.
Issues
  • Feature request: define macros in project settings

    Feature request: define macros in project settings

    Unreal Engine 4 shaders are heavily #ifdefed, and most of those are defined at shader compile time by CPU code. This results in large parts of code being greyed out in the VS editor due to #if arguments evaluating to 0.

    Thus, it would be nice to define these from a dialog somewhere, preferably associated with the project.

    enhancement 
    opened by inequation 26
  • Autocomplete doubles up first letter

    Autocomplete doubles up first letter

    • Visual Studio 2015 Enterprise
    • Only third party extension installed aside from this is P4VS
    • Editing .usf (Unreal shaders, still compliant HLSL though) files
    • Tried nightly and VS Gallery version

    Steps to reproduce:

    1. With Intellisense on, type a variable or function name.
    2. When autocomplete shows up, select any of the suggestions.
    3. The first letter will be doubled up, e.g. CalcSceneColorAndDepth becomes CCalcSceneColorAndDepth.
    opened by Friendly0Fire 9
  • Crashes Visual Studio opening large file.

    Crashes Visual Studio opening large file.

    The extension makes Visual Studio crash a few seconds after opening a specific, relatively large file (~500 lines, plus includes and macros), every time the file is opened.

    Visual Studio 2015 Update 3 Community Windows 10 x64 Creators Update Xeon E5-2683 V3 32 GB RAM This version of the extension : http://vsixgallery.com/extension/7def6c01-a05e-42e6-953d-3fdea1891737/

    opened by ldotn 8
  • Implement keyword completion

    Implement keyword completion

    When you type if( or even if  (space), the code turns into ProcessIsolineTessFactors, so in order to properly type an if you have to either disable Intellisense altogether or remember to type ESC right after typing if. Now if is a pretty common keyword, it should be supported by the tool and should be on top of the Intellisense list. Every time I type an if it changes into something I don't want, that bothered me so much that I've disabled the feature altogether but then Notepad++ provides better coding capabilities. Other than that this tool is good and definitely keep up the good work! Too bad there's no official support from MS for a tool like this.

    opened by Alan-FGR 7
  • Is there a way to use HLSL tools with Unity?

    Is there a way to use HLSL tools with Unity?

    The last commit in "unity" banch was almost a year ago, with no stable release yet. Are there any plans to continue developing it in the nearest future?

    If not, is there any workaround to avoid the most crucial errors at least in the CG part of Unity shaders with the current stable version of HLSL tools? By errors I mean a lack of:

    • Support for the basic types like fixed
    • A way to specify a folder with Unity's built-in cginc files (so #include "UnityCG.cginc" won't highlight as an error and will also provide all the built-in functions/structs/macros).
    • Support for including cginc files by a path relatively to project root. So that #include "Assets/Shaders/MyFile.cginc" will work.
    • Support for preprocessor directives like #if defined(FOO).

    The whole ShaderLab part is not as important. After all, you can extract the entire CG code to the external cginc file, if you don't want to see errors. But inability to include cgincs and the lack of support for internal types devalues all the benefits of this amazing extention for Unity-shader development :disappointed_relieved: .

    opened by Lex-DRL 7
  • Add .usf (Unreal Engine shaders) to the list of supported extensions

    Add .usf (Unreal Engine shaders) to the list of supported extensions

    I work with the Unreal Engine 4 and I'd love it if I didn't have to manually change the GUID every time a HLSL Tools update arrives. ;)

    Perhaps you could just add this extension to the manifest? It's not a widely used one, there is little chance of ambiguity.

    enhancement 
    opened by inequation 7
  • PrimitiveIndex causes unhandled exception from BindFunctionInvocationExpression

    PrimitiveIndex causes unhandled exception from BindFunctionInvocationExpression

    VS 2019 (16.7.2), HlslTools 1.1.302

    This looks similar to #203, but the stack trace is a bit different. It happens in a very large HLSL file, so I don't know what code exactly triggered it. Other files in the same project are ok.

    This extension looks great otherwise - makes VS an actual IDE for HLSL, instead of a glorified notepad. Thanks for your work!

    VS xml log event with some newlines added for readability:

        <type>Error</type>
        <source>Editor or Editor Extension</source>
        <description>System.AggregateException: One or more errors occurred. 
    ---&gt; System.AggregateException: One or more errors occurred. 
    ---&gt; System.InvalidOperationException: Sequence contains no elements&#x000D;&#x000A;
       at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.ImmutableArrayExtensions.First[T](ImmutableArray`1 immutableArray, Func`2 predicate)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionInvocationExpression(FunctionInvocationExpressionSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindExpression(ExpressionSyntax node)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindEqualsValue(EqualsValueClauseSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindInitializer(InitializerSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarator(VariableDeclaratorSyntax syntax, TypeSymbol variableType, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass24_0.&lt;BindVariableDeclaration&gt;b__1(VariableDeclaratorSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarationStatement(VariableDeclarationStatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindStatement(StatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__1(StatementSyntax y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__0(StatementSyntax x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindBlock(BlockSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass29_0.&lt;BindFunctionDefinition&gt;b__3(BlockSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionDefinition(FunctionDefinitionSyntax declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindGlobalDeclaration(SyntaxNode declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__1(SyntaxNode y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__0(SyntaxNode x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindTopLevelDeclarations(List`1 declarations, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindCompilationUnit(CompilationUnitSyntax compilationUnit)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindRoot(SyntaxNode syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind(SyntaxNode syntaxRoot, CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModel(Nullable`1 cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModelBase(CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Document.&lt;&gt;c__DisplayClass20_2.&lt;&lt;-ctor&gt;b__3&gt;d.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&#x000D;&#x000A;   
    --- End of inner exception stack trace 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Document.&lt;GetSemanticModelAsync&gt;d__28.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractSemanticQuickInfoProvider.&lt;BindTokenAsync&gt;d__3.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractSemanticQuickInfoProvider.&lt;BuildContentAsync&gt;d__0.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractQuickInfoProvider.&lt;GetQuickInfoItemAsync&gt;d__2.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractQuickInfoProvider.&lt;GetItemAsync&gt;d__0.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.QuickInfoService.&lt;GetQuickInfoAsync&gt;d__6.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Editor.Implementation.QuickInfo.QuickInfoSource.&lt;GetQuickInfoItemAsync&gt;d__3.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;   
    --- End of inner exception stack trace 
    ---&#x000D;&#x000A;
       at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;UpdateAsync&gt;d__32.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoPresentationSession.&lt;UpdateAsync&gt;d__5.MoveNext()&#x000D;&#x000A;
    ---&gt; (Inner Exception #0) System.AggregateException: One or more errors occurred. 
    ---&gt; System.InvalidOperationException: Sequence contains no elements&#x000D;&#x000A;
       at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.ImmutableArrayExtensions.First[T](ImmutableArray`1 immutableArray, Func`2 predicate)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionInvocationExpression(FunctionInvocationExpressionSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindExpression(ExpressionSyntax node)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindEqualsValue(EqualsValueClauseSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindInitializer(InitializerSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarator(VariableDeclaratorSyntax syntax, TypeSymbol variableType, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass24_0.&lt;BindVariableDeclaration&gt;b__1(VariableDeclaratorSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarationStatement(VariableDeclarationStatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindStatement(StatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__1(StatementSyntax y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__0(StatementSyntax x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindBlock(BlockSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass29_0.&lt;BindFunctionDefinition&gt;b__3(BlockSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionDefinition(FunctionDefinitionSyntax declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindGlobalDeclaration(SyntaxNode declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__1(SyntaxNode y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__0(SyntaxNode x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindTopLevelDeclarations(List`1 declarations, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindCompilationUnit(CompilationUnitSyntax compilationUnit)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindRoot(SyntaxNode syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind(SyntaxNode syntaxRoot, CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModel(Nullable`1 cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModelBase(CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Document.&lt;&gt;c__DisplayClass20_2.&lt;&lt;-ctor&gt;b__3&gt;d.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&#x000D;&#x000A;   
    --- End of inner exception stack trace 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Document.&lt;GetSemanticModelAsync&gt;d__28.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractSemanticQuickInfoProvider.&lt;BindTokenAsync&gt;d__3.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractSemanticQuickInfoProvider.&lt;BuildContentAsync&gt;d__0.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractQuickInfoProvider.&lt;GetQuickInfoItemAsync&gt;d__2.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.AbstractQuickInfoProvider.&lt;GetItemAsync&gt;d__0.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.QuickInfo.QuickInfoService.&lt;GetQuickInfoAsync&gt;d__6.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Editor.Implementation.QuickInfo.QuickInfoSource.&lt;GetQuickInfoItemAsync&gt;d__3.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;
       at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;
    ---&gt; (Inner Exception #0) System.InvalidOperationException: Sequence contains no elements&#x000D;&#x000A;
       at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.ImmutableArrayExtensions.First[T](ImmutableArray`1 immutableArray, Func`2 predicate)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionInvocationExpression(FunctionInvocationExpressionSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindExpression(ExpressionSyntax node)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindEqualsValue(EqualsValueClauseSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindInitializer(InitializerSyntax syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarator(VariableDeclaratorSyntax syntax, TypeSymbol variableType, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass24_0.&lt;BindVariableDeclaration&gt;b__1(VariableDeclaratorSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent, Func`3 createSymbol)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclaration(VariableDeclarationSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindVariableDeclarationStatement(VariableDeclarationStatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindStatement(StatementSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__1(StatementSyntax y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass95_0.&lt;BindBlock&gt;b__0(StatementSyntax x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindBlock(BlockSyntax syntax, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass29_0.&lt;BindFunctionDefinition&gt;b__3(BlockSyntax x)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindFunctionDefinition(FunctionDefinitionSyntax declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindGlobalDeclaration(SyntaxNode declaration, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__1(SyntaxNode y)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.&lt;&gt;c__DisplayClass16_0.&lt;BindTopLevelDeclarations&gt;b__0(SyntaxNode x)&#x000D;&#x000A;
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()&#x000D;&#x000A;
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)&#x000D;&#x000A;
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)&#x000D;&#x000A;
       at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable`1 items)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindTopLevelDeclarations(List`1 declarations, Symbol parent)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindCompilationUnit(CompilationUnitSyntax compilationUnit)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.BindRoot(SyntaxNode syntax)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind[TInput,TResult](TInput node, Func`2 bindMethod)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Binding.Binder.Bind(SyntaxNode syntaxRoot, CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModel(Nullable`1 cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Hlsl.Compilation.Compilation.GetSemanticModelBase(CancellationToken cancellationToken)&#x000D;&#x000A;
       at ShaderTools.CodeAnalysis.Document.&lt;&gt;c__DisplayClass20_2.&lt;&lt;-ctor&gt;b__3&gt;d.MoveNext()&#x000D;&#x000A;
    --- End of stack trace from previous location where exception was thrown 
    ---&#x000D;&#x000A;
       at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&lt;
    ---&#x000D;&#x000A;&lt;
    ---&#x000D;&#x000A;</description>```
    opened by ngcg 6
  • Unreal files with extension .usf and .ush not parsing correctly.

    Unreal files with extension .usf and .ush not parsing correctly.

    Unreal shader files that are open in VS2019 will parse correctly when the solution is first opened but any other .ush .usf files that are then opened will not parse unless VS2019 is closed and then reopened.

    Also when pasting text into an unreal shader file that appears to have parsed correctly, results in the text being pasted twice into the file.

    I made a private build of HlslTools with the Unreal extensions added but it resulted in no change in outcome apart from the fact that I no longer need to add the extensions in VS2019 Text editor extension options.

    Branch in my fork is here https://github.com/PiezPiedPy/HlslTools/tree/UE4

    opened by PiezPiedPy 6
  • Highlight matching parens feature

    Highlight matching parens feature

    It would be nice for HLSL Tools to highlight matching parens, brackets, and braces when the cursor is placed on one of the pair, similar to VS and other editors.

    opened by Reedbeta 6
  • Macros does not work with #ifdef

    Macros does not work with #ifdef

    I have added my defined by accessing: options.PreprocessorDefines.Add("VERTEX_COLOR")

    Then in my shader if I have #if VERTEX_COLOR it works, but if I have #ifdef VERTEX_COLOR does not work.

    opened by amerkoleci 6
  • Please ignore Raw string literals.

    Please ignore Raw string literals.

    Hi, I'd like to #include my shaders with my source code, unfortunately I can't put R"( and )" around my shader because the syntax high-lighting gets completely removed. Is there anyway it can just ignore the R"( at the start of the code? Thanks.

    opened by DaveHoskins 5
  • Support relative path in virtual directory mapping

    Support relative path in virtual directory mapping

    Supported use of relative path in virtual directory key, value and include path.

    For example, we write shadertoolsconfig.json like this:

    {
        "hlsl.additionalIncludeDirectories": [
            ".",
            "/UnityProjects\\PlaygroundHDRP"
        ],
        "hlsl.virtualDirectoryMappings": {
            "Packages\\com.unity.render-pipelines.high-definition": "D:\\UnityProjects\\PlaygroundHDRP\\Library\\PackageCache\\[email protected]", 
            "D:\\UnityProjects/PlaygroundHDRP\\Packages\\com.unity.render-pipelines.core": "Library/PackageCache\\[email protected]"
        }
    }
    

    Then HlslTools extension can correctly parse the include paths like these:

    #include "/UnityProjects/PlaygroundHDRP\\Packages\\com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl"
    #include "/UnityProjects\\PlaygroundHDRP\\Library\\PackageCache\\[email protected]/Runtime/Material/MaterialUtilities.hlsl"
    #include "D:\\UnityProjects/PlaygroundHDRP\\Packages\\com.unity.render-pipelines.core/ShaderLibrary/Sampling/SampleUVMapping.hlsl"
    #include "D:\\UnityProjects\\PlaygroundHDRP\\Library\\PackageCache\\[email protected]/Runtime/Material/MaterialUtilities.hlsl"
    #include "Packages/com.unity.render-pipelines.core\\ShaderLibrary/Sampling\\SampleUVMapping.hlsl"
    #include "Packages\\com.unity.render-pipelines.high-definition/Runtime/Material/MaterialUtilities.hlsl"
    

    The logic is like this: In the json file we have "<vpath>": "<rpath>" pairs. The extension will create a virtual directory at <vpath>, which will be mapped to the real path <rpath>. If <vpath> or <rpath> is not a fully qualified path, then absolute fully qualified path will be calculated based on the path of json file. And when the extension searches include files, it will obey the normal search rule. If the include path is a relative path, tries to prefix include directories and convert it to absolute path. And then tries to find the file in that path, considering virtual directories.

    opened by zongsheng-zhao 1
  • Minor quality-of-lfe issue:  Open incude file With F12 is disabled

    Minor quality-of-lfe issue: Open incude file With F12 is disabled

    One can open aninclude file (.HLSLI) like this: image

    But not with the standad F12, which works for everything else in HLSL plugin, and ofc is standard for VS image

    This plugin is a GOD-send for people who edit shaders a lot, and this small "quality of life" fix would make it even better.

    Thanks in advace for your fantastic work

    Phazer

    opened by mr-phazer 0
  • IIncludeFileSystem not called anymore when using empty path or null in SourceFile

    IIncludeFileSystem not called anymore when using empty path or null in SourceFile

    found this (very small) issue when creating syntax tree with either null string and custom include resolver:

    string path = null; var syntaxTree = SyntaxFactory.ParseSyntaxTree(new SourceFile(SourceText.From(code), path), null, myIncludeFileSystem);

    if path is an empty string (or a null), include file system is never called.

    if path is any string (not even an existing path), then it is called.

    Will PR a fix that allows empty path or null string, since in some cases my files are just scripts and have no location, so include handler should still be called.

    opened by mrvux 0
  • Bump lodash from 4.17.20 to 4.17.21 in /src/ShaderTools.VSCode

    Bump lodash from 4.17.20 to 4.17.21 in /src/ShaderTools.VSCode

    Bumps lodash from 4.17.20 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Fields on a struct declared after method not recognized

    Fields on a struct declared after method not recognized

    When a method defined in a struct uses fields that are defined after that method, HLSL Tools does not recognize and highlight them. For example: image

    Example code:

    struct ExampleStruct
    {
    	void exampleMethod(float x, float y)
    	{
    		field1 = x;
    		field2 = y;
    	}
    
    	float field1;
    	float field2;
    };
    

    The fields declared before a method are properly recognized, though: image

    opened by JoaoBaptMG 0
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages

ShaderConductor ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages. Features Converts HLSL to readable, usable and

Microsoft 1.5k Jul 26, 2022
Visual Studio Extension that installs additional color themes

Using this Extension Download and install the extension Restart Visual Studio Navigate to Tools > Options > Environment > General and select your colo

Microsoft 327 Jul 16, 2022
A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.

VsChromium VsChromium is a Visual Studio Extension containing a collection of tools useful for editing, navigating and debugging code. VsChromium was

The Chromium Project 253 Jul 24, 2022
Visual Studio native debugger extension to help debug native applications using Mono.

Unity Mixed Callstack UnityMixedCallstack is a Visual Studio 2017/2019 extension to help debug native applications embedding Mono, like Unity. If you

Unity Technologies 73 Aug 5, 2022
HLSL Parser and Translator for HLSL, GLSL, and MSL.

HLSLParser This is a fork of Unknownworld's hlslparser adapted to our needs in The Witness. We currently use it to translate pseudo-HLSL shaders (usin

null 3 Jul 2, 2022
HLSL Parser and Translator for HLSL, GLSL, and MSL.

HLSLParser This is a fork of Unknownworld's hlslparser adapted to our needs in The Witness. We currently use it to translate pseudo-HLSL shaders (usin

null 312 Jul 6, 2022
Half-Life Singleplayer SDK 2.3, updated to compile with Visual Studio 2019. Provided as-is with no further support. See the README for more information.

Half Life 1 SDK LICENSE Half Life 1 SDK Copyright© Valve Corp. THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE

Sam Vanheer 5 Apr 9, 2022
Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.

Sharpmake Introduction Sharpmake is a generator for Visual Studio projects and solutions. It is similar to CMake and Premake, but it is designed for s

Ubisoft 750 Aug 1, 2022
High-level interface for low-level programming

Singeli Singeli is now able to compile useful programs to C, but it's very rough around the edges, with poor error reporting. We are beginning to use

Marshall Lochbaum 27 Jun 14, 2022
Bungie's Oni modified so it compiles with Microsoft Visual Studio 2019.

OniFoxed What's this? This is a modified variant of the recently leaked Oni source code so that it compiles under Microsoft Visual Studio 2019 with so

Mark Sowden 48 Jul 16, 2022
A D++ Discord Bot template for Visual Studio 2019 (x64 and x86)

D++ Windows Bot Template A D++ Discord Bot template for Visual Studio 2019 (x64 and x86, release and debug). The result of this tutorial. This templat

brainbox.cc 19 Jul 16, 2022
A Visual Studio template used to create Cobalt Strike BOFs

Introduction Cobalt Strike beacon object files (BOFs) is a feature that added to the beacon in order to allow rapid beacon extendibility in a more OPS

Securify 146 Jul 30, 2022
Visual Studio Test Adapter for Catch2

Test Adapter for Catch2 Within Visual Studio, the Test Explorer is a convenient way to run and debug unit tests. This test adapter adds support for th

null 89 Aug 9, 2022
Useful UE4 Visual Studio extensions.

UE4 Smarter Macro Indenting This extension was designed to fix the unnecessary and annoying "smart" indenting that Visual Studio likes to do around va

Chris Pawlukowsky 241 Jun 14, 2022
An AI for playing NES Tetris at a high level. Based primarily on search & heuristic, with high quality board evaluation through value iteration.

StackRabbit An AI that plays NES Tetris at a high level. Primarily based on search & heuristic, with high-quality board eval through value iteration.

Greg Cannon 212 Jul 27, 2022
Program your micro-controllers in a fast and robust high-level language.

Toit language implementation This repository contains the Toit language implementation. It is fully open source and consists of the compiler, virtual

Toit language 931 Jul 28, 2022
RRxIO - Robust Radar Visual/Thermal Inertial Odometry: Robust and accurate state estimation even in challenging visual conditions.

RRxIO - Robust Radar Visual/Thermal Inertial Odometry RRxIO offers robust and accurate state estimation even in challenging visual conditions. RRxIO c

Christopher Doer 56 Jul 26, 2022
Visual Leak Detector for Visual C++ 2008-2015

Visual Leak Detector Introduction Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. This memory leak detec

Arkady Shapkin 867 Jul 27, 2022