Skip to content

Syntax highlighting for GLSL inside of JavaScript tagged template strings

License

Notifications You must be signed in to change notification settings

gre/vscode-glsl-literal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscode-glsl-literal

Adds GLSL syntax highlighting for JavaScript template literals.

Match on

glsl`` | glslify`` | frag`` | vert``

Example

const vert = glsl`
  attribute vec4 aVertexPosition;
  uniform mat4 uModelViewMatrix;
  uniform mat4 uProjectionMatrix;
  void main() {
    gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;
  }
`;

Caveat

If you're not using glslify or another glsl processing library, you will need an identity function named as above to match the syntax.

const glsl = x => x;

About

Syntax highlighting for GLSL inside of JavaScript tagged template strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published