A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
hello, tgjones, first i want to thank you very much for your great toll
To explain my problem lets consider the following situation.
// definition of a global used structure Source File A: structure_def.inc
struct Global_used_structure
{
float a;
float b;
}
// B is using it Source File B: B_using_structure_A.fx
include "structure_def.inc"
Global_used_structure my_point ;
// C is using it
Source File C: C_using_structure_A.fx
in
clude "structure_def.inc"
Global_used_structure my_other_point ;
// D is also using it Source File D: problem_file.fx
include "structure_def.inc"
include “B_using_structure_A.fx”
include “C_using_structure_A.fx”
Global_used_structure my_new_point ;
here i will get error of redefinition of structure because it is included several times. But in this version syntax highlighting and context help of HLSL tools works correctly.
OK i can change
// definition of a global used structure Source File A: structure_def.inc
struct Global_used_structure
{
float a;
float b;
}
In this version the code wil compile,
but i loose code sensitive functions of the include file contents
e.g. goto definitions and also the HLSL tool will highlight me much errors in the code, because the structure is not correctly identified.
How to solve this ?
"PrimitiveIndex"
block from IntrinsicFunctions.SM6.cs
fixes the bug mentioned in this issue: https://github.com/tgjones/HlslTools/issues/205#issuecomment-823624141
hi, i'm having problems with virtual directory mappings
i have a SMAA.ush
where i have #include "/Engine/Private/Common.ush"
(ush is associated with hlsl in vscode)
i've created a shadertoolsconfig.json
file and placed next to my SMAA.ush
shader file
it contains:
{
"hlsl.virtualDirectoryMappings": {
"/Engine": "C:\\Program Files\\Epic Games\\UE_4.26\\Engine\\Shaders"
}
}
C:\Program Files\Epic Games\UE_4.26\Engine\Shaders\Private\Common.ush