tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
568 stars 98 forks source link

Signature matching/filtering for overloads #94

Open Lex-DRL opened 7 years ago

Lex-DRL commented 7 years ago

If a few function overloads are defined in an external file (.cginc, for Unity), possible signatures are not filtered as you type. E.g., I have the following overloads in the included file: 000 As you can see, they're designed to automatically handle any combination of float3/4 as input/output arguments. In C# IntelliSense, the list of possible overloads is shortened as you pass each argument. So, in this example, after I pass a float4 variable as the 1st arg, only 2 overloads should have left. But it doesn't happen, and HLSLTolls still show all 4 of them: 001

If a function takes more then 2 arguments, and you want to create all the possible overloads for simpler use in future, there could easily be dozens of them. I personally do have plenty of such cginc's that I make once and never think about how to use them in the future.

So filtering overloads as you type (C#-style) would be a nice feature.

Ph0t0nX commented 3 years ago

Is there a way to use HLSL tools with .shader files?

tgjones commented 3 years ago

Is there a way to use HLSL tools with .shader files?

The short answer is "no". The slightly longer answer is that I started adding support for .shader files, but didn't manage to finish it, and I'm not sure if I'll ever find time to finish it.

But this issue is slightly different - signature help filtering is not unique to Unity shaders, and I'd still like to implement that.

leshiystudio commented 1 year ago

Есть ли способ использовать инструменты HLSL с файлами .shader?

I have assigned the .shared file to the editor in the project settings. It worked but there are a lot of error messages. But on the other hand, various hints appear, for example, functions. It's more convenient than nothing. image