petereichinger / unity3d-shader Goto Github PK
View Code? Open in Web Editor NEWAdds Syntax Highlighting for Unity3D .shader files to Sublime Text
Adds Syntax Highlighting for Unity3D .shader files to Sublime Text
I have repro-ed this bug on multiple machines, and have determined that uninstalling this package fixes the problem. Both machines are on OS X.
To Repro:
Copy this shader from pastebin:
https://pastebin.com/raw/dLAsfj0E
Open Sublime.
Go File-New to create a new buffer.
Paste the contents into the buffer.
Attempt to save the file.
Observer that the 'Save' button in the Save dialog is greyed out and cannot be enabled.
Add highlighting CG highlighting between CGPROGRAM
and ENDCG
Adding a license file (like MIT) would be great for reusability
Hi,
Thanks for this package, very useful.
I noticed though that he current pattern matching for Functions will match subwords, for example if you created a variable to hold the result of 'n dot h' and call it ndoth then the 'dot' will be highlighted. Would be nice to avoid this.
For now in my own fork of this I just copy & paste the regex for the Type match and applied it to Functions. Seems to work ok, but I know very little regex stuff so might not be the right way to go about it.
Oh one other change I made was to add cginc to the filetype since the main reason for using Sublime Text was that I wanted to be able to read and find stuff in Unity's cginc files easier. Again seems to work fine, but I suspect to do it properly would take more work and might be better as a new package.
no Vector and Range type for Properties
The description of this repo says it only work with Sublime Text 2, but the package info indicates it works with ST3 also.
The Ctrl+/ commenting is not working in either Sublime Text 2 or 3. The code here appears to account for comments:
https://github.com/petereichinger/Unity3D-Shader/blob/master/UnityShader.tmLanguage#L22
But I know nothing about creating Sublime Text packages... I DO know about Unity Shaders, however, and this repo is a lifesaver! Thanks a million.
Also additional Unity specific variables
Obviously auto-completion would be amazing, especially suggestions for vertex input and output structs. Like if you named the input to your fragment stage "i", then typing "i." would bring up a menu of variables in the struct, like i.vertex, i.uv, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.