Skip to content

Instantly share code, notes, and snippets.

@kaneta1992
Created January 10, 2016 10:59
Show Gist options
  • Save kaneta1992/976b7d8a59395c45119d to your computer and use it in GitHub Desktop.
Save kaneta1992/976b7d8a59395c45119d to your computer and use it in GitHub Desktop.
three.js glsl組み込み定義
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME ShaderMaterial
4: #define VERTEX_TEXTURES
5: #define GAMMA_FACTOR 2
6: #define MAX_DIR_LIGHTS 0
7: #define MAX_POINT_LIGHTS 0
8: #define MAX_SPOT_LIGHTS 0
9: #define MAX_HEMI_LIGHTS 0
10: #define MAX_SHADOWS 0
11: #define MAX_BONES 251
12: uniform mat4 modelMatrix;
13: uniform mat4 modelViewMatrix;
14: uniform mat4 projectionMatrix;
15: uniform mat4 viewMatrix;
16: uniform mat3 normalMatrix;
17: uniform vec3 cameraPosition;
18: attribute vec3 position;
19: attribute vec3 normal;
20: attribute vec2 uv;
21: #ifdef USE_COLOR
22: attribute vec3 color;
23: #endif
24: #ifdef USE_MORPHTARGETS
25: attribute vec3 morphTarget0;
26: attribute vec3 morphTarget1;
27: attribute vec3 morphTarget2;
28: attribute vec3 morphTarget3;
29: #ifdef USE_MORPHNORMALS
30: attribute vec3 morphNormal0;
31: attribute vec3 morphNormal1;
32: attribute vec3 morphNormal2;
33: attribute vec3 morphNormal3;
34: #else
35: attribute vec3 morphTarget4;
36: attribute vec3 morphTarget5;
37: attribute vec3 morphTarget6;
38: attribute vec3 morphTarget7;
39: #endif
40: #endif
41: #ifdef USE_SKINNING
42: attribute vec4 skinIndex;
43: attribute vec4 skinWeight;
44: #endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment