Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Shader syntax color works for a sec then breaks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Icetigris
New Member

USA
4 Posts

Posted - Oct 05 2022 :  4:28:28 PM  Show Profile  Reply with Quote
When I open or click on an open shader, I see the enhanced highlighting for a few seconds, then all syntax highlighting on shaders breaks and I can't get it back. Regular .cpp and .h files are unaffected.

I'm using VS 2022, the latest VAX build, and I'm working with Unreal.

I had tried enabling shader syntax highlighting the old way (telling VS to treat usf/ush files like C++, setting the registry keys, rebuilding symbol database), and it didn't work, so I tried enabling the Enable support for shader files (beta) checkbox under Game Development, then restarting VS. That got syntax highlighting to work, but only for a second.

I tried disabling VAX to toggle it on/off to see if it would help and that crashed VS, though when I started VS again, VAX was in the state I wanted. It went like this: disabled VAX -> crashed VS -> opened VS (VAX was disabled) -> reenabled VAX -> crashed VS -> opened VS (VAX was enabled). I don't know if this crash is related. This did not fix the syntax highlighting issue, so I tried toggling enhanced syntax highlighting on and off, which behaved as expected, but also didn't fix the issue.

I see a little background task notification in the bottom left that says "User preferences overridden by .editorconfig", so I'm wondering if IntelliSense is stomping on the highlighting? I thought I let VAX disable that a while ago, and all the shader text is totally unhighlighted by anything after the VAX highlighting disappears, so I don't know what's going on there.

Icetigris
New Member

USA
4 Posts

Posted - Oct 28 2022 :  4:46:46 PM  Show Profile  Reply with Quote
Hey, this is still a problem for me. Could I please get some help?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Nov 14 2022 :  1:08:42 PM  Show Profile  Reply with Quote
Apologies for the slow reply about this.

What file extension, or file extensions, do your shader files have?

Are these shader files part of a solution, or are you just loading standalone shader files to edit in Visual Studio?

Is the VA navigation bar showing in the shader file? This is normally found at the top of the editor window and is where the Alt-M list appears from. I am trying to find out if VA is normally active in the shader file, or if it is inactive.

zen is the art of being at one with the two'ness
Go to Top of Page

Icetigris
New Member

USA
4 Posts

Posted - Nov 22 2022 :  3:27:47 PM  Show Profile  Reply with Quote
My shader files are .usf and .ush, they are part of the solution, and I do see the VA navigation bar.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Nov 23 2022 :  11:40:40 AM  Show Profile  Reply with Quote
Can you please try opening the file:

C:\Program Files\Epic Games\UE_4.27\Engine\Shaders\Private\VolumetricCloud.usf

in your IDE and see what happens? The same file exists for me in UE 5, so I am assuming you have this file as well. If you open the Alt-M list or VA Outline, are any of the functions in this file listed?

Assuming you have turned On VA's colouring for VA Outline and the Alt-M list, is the colouring being applied here? I am trying to work out if VA is actually properly handing a more complex shader file that contains functions, to see if this is "just" a colouring problem, or if VA is having wider problems with shader files on your system.

zen is the art of being at one with the two'ness
Go to Top of Page

Icetigris
New Member

USA
4 Posts

Posted - Nov 23 2022 :  12:58:06 PM  Show Profile  Reply with Quote
Yes, I see the functions in the VA Outline and the Alt-M list and they are properly colored in those lists.

Edited by - Icetigris on Nov 23 2022 12:59:30 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Nov 24 2022 :  1:07:18 PM  Show Profile  Reply with Quote
Thank you for checking this. Since VA is handling the shader files correctly, this suggests something is interfering with VA's colouring in the file, since it does appear briefly.

It could be another extension, or something about your default profile. To test this theory, can you first download the VS2022 specific installer for Visual Assist from:

https://downloadfiles.idera.com/WholeTomato/VA_X_Setup2463_0_x64.vsix

Next you will need extra details about the IDE install to create a test profile, which you get from running:

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

There will be a set of lines for each different version of Visual Studio that you have installed. For the version you want to install into, you want the "productPath", "dispalyName" and "installationVersion" lines, e.g.


productPath: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
displayName: Visual Studio Professional 2022
installationVersion: 17.3.32901.215


You can then use the information from these three lines to make sure that the following command has the correct command line parameters. The values are:

/appidname: = displayName:
/appidinstallpath: = productPath:
/skuVersion = installationVersion:

The "/skuName:" value is one of "Community / Pro / Enterprise", note for the Professional version it is "Pro", not the expected "Professional".

The working command, for VS2022, using the values above, is - split into lines to make it easier to read and edit:


"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\VSIXInstaller.exe"
/appidinstallpath:"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe"
/skuName:Pro
/appidname:"Visual Studio Professional 2022"
/skuVersion:17.3.32901.215
/rootSuffix:"VATest" "C:\Users\%USERNAME%\Downloads\VA_X_Setup2463_0_x64.vsix"


The "rootSuffix" is the name of the test profile you want to install to, and this will be created if it does not already exist. The final parameter is the path of the VSIX installer for Visual Assist that you want to install. Once you have the command set up, the only parts you should need to edit are the skuVersion and the path to the VSIX file, can you please close all instances of Visual Studio and run this command.

Running this command installs VA into the test profile, but it does not load the test profile. If you created the test profile by installing VA, when you run the test profile it will be using the default IDE settings, without asking you which settings you want to use.

To now load the test profile you use the command:

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

To load your normal, default profile just load the IDE normally. To return to this test profile again, pass the /RootSuffix command line switch when loading the IDE. You can run both profiles at the same time, next to each other. In VS2019 and VS2022 the profile name will be shown just under the close button, in the top right hand corner of the main IDE window. If you export your IDE settings from your main profile you can them import them into the test profile.

Do you see the same colouring problem in this test profile? Or are the shader files coloured correctly by VA in this test profile?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000