HlslTools icon indicating copy to clipboard operation
HlslTools copied to clipboard

Signature matching/filtering for overloads

Open Lex-DRL opened this issue 7 years ago • 3 comments

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.

Lex-DRL avatar May 28 '17 16:05 Lex-DRL

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

Ph0t0nX avatar Dec 19 '20 19:12 Ph0t0nX

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.

tgjones avatar Jan 02 '21 02:01 tgjones

Есть ли способ использовать инструменты 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

leshiystudio avatar Mar 12 '23 15:03 leshiystudio