Unity3D-Shader icon indicating copy to clipboard operation
Unity3D-Shader copied to clipboard

Add highlighting for more keywords

Open petereichinger opened this issue 9 years ago • 3 comments

  • #if
  • #define
  • uniform
  • POSITION

Also additional Unity specific variables

  • UNITY_MATRIX_MVP

petereichinger avatar Apr 27 '15 21:04 petereichinger

@mysteryDate could you show me examples for the other highlighting and how you want it done?

petereichinger avatar Apr 28 '15 09:04 petereichinger

C-like languages usually have special highlighting for strings:

capture

...and for inline functions, as well as function calls:

capture2

The above are just a unity shader with C++ syntax selected.

Here's an example of what CG highlighting does, as it knows all possible variable types (of which there are not that many, obviously there's half, fixed, half4, etc.):

variables

..and finally highlighting for CG built in functions:

specialwords

I should definitely pull the source and put some work into this myself. I'm just at work at the moment.

mysteryDate avatar Apr 28 '15 13:04 mysteryDate

String highlighting is already working with the newest version.

Looking at the other stuff atm.

petereichinger avatar Apr 30 '15 18:04 petereichinger