-
Notifications
You must be signed in to change notification settings - Fork 38.1k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitylanguages-basicBasic language support issuesBasic language support issuesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
VSCode already includes built-in syntax highlighting for Unity ShaderLab files. It would be nice to also include built-in syntax highlighting for HLSL files. (And HLSL was created by Microsoft, to give weight to the included-by-default argument.)
ShaderLab files include embedded Cg shaders (between CGPROGRAM/ENDCG or CGINCLUDE/ENDCG delimiters).
As stated here, as far as Unity is concerned, HLSL and Cg can be treated as the same thing:
In Unity, shader programs are written in a variant of HLSL language (also called Cg but for most practical uses the two are the same).
So if we:
- add HLSL syntax highlighting to VSCode
- use HLSL syntax highlighting within
CGPROGRAM/ENDCGas an embedded grammar
... we can both improve ShaderLab syntax highlighting, and also support HLSL syntax highlighting.
I'm just about to submit a PR with these proposed changes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitylanguages-basicBasic language support issuesBasic language support issuesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded