add highlight rules for glsl
This commit is contained in:
parent
e92ed07a19
commit
3945fe924a
5 changed files with 178 additions and 1 deletions
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