Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Code in shaders greyed out incorrectly

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
daniwrig Posted - Feb 13 2026 : 3:07:32 PM
Hi, I'm working on shaders in Unreal Engine. These files have .usf or .ush extensions. When Visual Assist has 'Enable support for shader files' enabled, all the lines of code inside #if statements are greyed out, making it very difficult to understand, even though these conditions can't be known by Visual Assist.

eg

#if LUMEN_HARDWARE_RAYTRACING || LUMEN_HARDWARE_INLINE_RAYTRACING

ALL CODE HERE IS GREYED OUT, EVEN THOUGH VAX DOESN'T KNOW THE VALUE OF LUMEN_HARDWARE_RAYTRACING

#endif


If I disable 'Enable support for shader files', then the greying out is fixed.

VA_X64.dll file version 10.9.2602.0 built 2026.02.05
DevEnv.exe version 17.14.36930.0 Professional
msenv.dll version 17.0.36915.8
Comctl32.dll version 6.10.26100.7824
Windows 11 11.0 24H2 Build 26100
64 processors (x86-64)
Language info: 1252, 0x409
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 11 2026 : 11:46:35 AM
This is what I am seeing in VS2022, version 17.14.27, when opening a simple test USF file. This is a machine where Visual Assist has Never been installed, it is my start point for a lot of test cases.



Since VA is not installed, the line shown in grey is coming from the IDE alone.

I do have the HLSL Tools component for VS2022 installed, in case that matters.

This is running on Windows 11.

For me, the IDE setting:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> View -> Disable Inactive Code Opacity = True / False

has no effect, but I would not expect a C++ setting to effect what is happening in a USF file.

Are you seeing any greying at all in USF files when VA is disabled? Or are you saying that the greying goes from correct to incorrect when VA is active?
daniwrig Posted - Mar 09 2026 : 3:10:23 PM
With:
IDE Tools menu -> Options -> Text Editor -> C/C++ -> View -> Show Inactive Code Blocks = False (VS 2022),
I don't have any incorrect greying in .cpp or .usf files, UNLESS VAX 'Enable Support For Shader Files' is enabled, which says to me this is a Visual Assist bug.
feline Posted - Feb 16 2026 : 11:51:22 AM
This is coming from the IDE, not from VA. It does not happen in VS2019, with the same version of VA, and if you disable VA, this code is still shown as greyed out.

So far though I am not seeing an option to control this behaviour in VS2022. There is the setting:

IDE Tools menu -> Options -> Text Editor -> C/C++ -> View -> Disable Inactive Code Opacity = True / False

But this isn't having any effect. No surprise really, since its a language specific setting.

You might have some fun playing with the "Text Editor -> HLSL" settings, on the theory these apply to these files as well.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000