Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Custom file extensions .vsh .vshader #32

Open
graptis opened this issue Jun 21, 2019 · 3 comments
Open

Problem with Custom file extensions .vsh .vshader #32

graptis opened this issue Jun 21, 2019 · 3 comments

Comments

@graptis
Copy link

graptis commented Jun 21, 2019

Installed product versions

  • Visual Studio: 2019 Enterprise
  • This extension: 0.5.67

Description

Custom vertex shader extension not applied (Fragment shader extension is applied normally).

Steps to recreate

  1. Open Options->GLSLangIntegration->Configure
  2. Replace ".vert",".frag" extensions with ".vert;.vsh", ".frag;.fsh"
  3. Save, close and reopen visual studio
  4. Prepare 4 files: 1 vertex shader with name "anyname.vert", a copy of it with name "anyname.vsh", a fragment shader with name "anyname.frag", a copy of it with name "anyname.fsh". Open them in visual studio.

Current behavior

The file anyname.vsh does not have GLSL syntax highlighting and live compilation.
The files anyname.vert, anyname.frag, anyname.fsh all have correct GLSL syntax highlighting and live compilation.

Expected behavior

All four files have GLSL syntax highlighting and live compilation.

@danielscherzer
Copy link
Owner

danielscherzer commented Jun 23, 2019

Hi! Thanks for your feedback!
I can reconstruct this behaviour.
First: if you change the file extensions you have to restart VS Studio. After this the frag and vert extensions are treated as unknown as expected.
Then the problem with vsh (also vshader): These exensions are somehow associated with hsl shader files and Visual Studio ignores my extension in this case (even if you have no DirectX specific VS packages installed). If you for instance use a different vertex shader extension, like vvv (restart) my extension works as expected. I have not found a way to force Visual Studio to forget about these (maybe internal) hlsl extensions, sorry. If you have any idea (insider knowledge) how to solve this I would be happy to include it into the code.
Cheers, Daniel

@graptis
Copy link
Author

graptis commented Jun 24, 2019

Gotcha. I do not really know how to solve this either, if I come up with any relevant information I'll be happy to share (odds of that are astronomically low though :( ). Close or leave open to avoid other people reporting the same?

@danielscherzer
Copy link
Owner

Leave it open! Thanks!

@danielscherzer danielscherzer changed the title Custom vertex shader extension not used Problem with Custom file extensions .vsh .fsh .vshader .fshader Aug 16, 2022
@danielscherzer danielscherzer changed the title Problem with Custom file extensions .vsh .fsh .vshader .fshader Problem with Custom file extensions .vsh .vshader Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants