add highlight rules for glsl
This commit is contained in:
parent
e92ed07a19
commit
3945fe924a
5 changed files with 178 additions and 1 deletions
|
|
@ -96,6 +96,7 @@ var modesByName = {
|
|||
csharp: ["C#" , "cs"],
|
||||
css: ["CSS" , "css"],
|
||||
diff: ["Diff" , "diff|patch"],
|
||||
glsl: ["Glsl" , "glsl|frag|vert"],
|
||||
golang: ["Go" , "go"],
|
||||
groovy: ["Groovy" , "groovy"],
|
||||
haxe: ["haXe" , "hx"],
|
||||
|
|
@ -177,6 +178,7 @@ var docs = {
|
|||
"docs/csharp.cs": "C#",
|
||||
"docs/css.css": "CSS",
|
||||
"docs/diff.diff": "Diff",
|
||||
"docs/glsl.glsl": "Glsl",
|
||||
"docs/golang.go": "Go",
|
||||
"docs/groovy.groovy": "Groovy",
|
||||
"docs/Haxe.hx": "haXe",
|
||||
|
|
|
|||
20
demo/kitchen-sink/docs/glsl.glsl
Normal file
20
demo/kitchen-sink/docs/glsl.glsl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
uniform float amplitude;
|
||||
attribute float displacement;
|
||||
varying vec3 vNormal;
|
||||
|
||||
void main() {
|
||||
|
||||
vNormal = normal;
|
||||
|
||||
// multiply our displacement by the
|
||||
// amplitude. The amp will get animated
|
||||
// so we'll have animated displacement
|
||||
vec3 newPosition = position +
|
||||
normal *
|
||||
vec3(displacement *
|
||||
amplitude);
|
||||
|
||||
gl_Position = projectionMatrix *
|
||||
modelViewMatrix *
|
||||
vec4(newPosition,1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue