Skip to content

Commit

Permalink
WebGLDeferredRenderer: Replaced THREE.ShaderChunks with #includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 20, 2017
1 parent b461683 commit de6b753
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions examples/js/renderers/WebGLDeferredRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1708,19 +1708,19 @@ THREE.ShaderDeferred = {
"varying vec3 vNormal;",
"varying vec4 vPosition;",

THREE.ShaderChunk[ "morphtarget_pars_vertex" ],
THREE.ShaderChunk[ "skinning_pars_vertex" ],
"#include <morphtarget_pars_vertex>",
"#include <skinning_pars_vertex>",

"void main() {",

THREE.ShaderChunk[ "begin_vertex" ],
THREE.ShaderChunk[ "beginnormal_vertex" ],
THREE.ShaderChunk[ "skinbase_vertex" ],
THREE.ShaderChunk[ "skinnormal_vertex" ],
THREE.ShaderChunk[ "defaultnormal_vertex" ],
THREE.ShaderChunk[ "morphtarget_vertex" ],
THREE.ShaderChunk[ "skinning_vertex" ],
THREE.ShaderChunk[ "project_vertex" ],
"#include <begin_vertex>",
"#include <beginnormal_vertex>",
"#include <skinbase_vertex>",
"#include <skinnormal_vertex>",
"#include <defaultnormal_vertex>",
"#include <morphtarget_vertex>",
"#include <skinning_vertex>",
"#include <project_vertex>",

" vNormal = normalize( transformedNormal );",
" vPosition = gl_Position;",
Expand Down Expand Up @@ -1765,21 +1765,21 @@ THREE.ShaderDeferred = {

vertexShader: [

THREE.ShaderChunk[ "uv_pars_vertex" ],
THREE.ShaderChunk[ "morphtarget_pars_vertex" ],
THREE.ShaderChunk[ "skinning_pars_vertex" ],
"#include <uv_pars_vertex>",
"#include <morphtarget_pars_vertex>",
"#include <skinning_pars_vertex>",

"void main() {",

THREE.ShaderChunk[ "uv_vertex" ],
THREE.ShaderChunk[ "begin_vertex" ],
THREE.ShaderChunk[ "beginnormal_vertex" ],
THREE.ShaderChunk[ "skinbase_vertex" ],
THREE.ShaderChunk[ "skinnormal_vertex" ],
THREE.ShaderChunk[ "defaultnormal_vertex" ],
THREE.ShaderChunk[ "morphtarget_vertex" ],
THREE.ShaderChunk[ "skinning_vertex" ],
THREE.ShaderChunk[ "project_vertex" ],
"#include <uv_vertex>",
"#include <begin_vertex>",
"#include <beginnormal_vertex>",
"#include <skinbase_vertex>",
"#include <skinnormal_vertex>",
"#include <defaultnormal_vertex>",
"#include <morphtarget_vertex>",
"#include <skinning_vertex>",
"#include <project_vertex>",

"}"

Expand All @@ -1792,8 +1792,8 @@ THREE.ShaderDeferred = {
"uniform vec3 specular;",
"uniform float shininess;",

THREE.ShaderChunk[ "uv_pars_fragment" ],
THREE.ShaderChunk[ "map_pars_fragment" ],
"#include <uv_pars_fragment>",
"#include <map_pars_fragment>",
THREE.DeferredShaderChunk[ "packVector3" ],

"void main() {",
Expand All @@ -1802,7 +1802,7 @@ THREE.ShaderDeferred = {
" vec3 emissiveColor = emissive;",
" vec3 specularColor = specular;",

THREE.ShaderChunk[ "map_fragment" ],
"#include <map_fragment>",
THREE.DeferredShaderChunk[ "packColor" ],

" gl_FragColor = packedColor;",
Expand Down Expand Up @@ -2117,19 +2117,19 @@ THREE.ShaderDeferred = {
"varying vec3 vNormal;",
"varying vec4 vPosition;",

THREE.ShaderChunk[ "morphtarget_pars_vertex" ],
THREE.ShaderChunk[ "skinning_pars_vertex" ],
"#include <morphtarget_pars_vertex>",
"#include <skinning_pars_vertex>",

"void main() {",

THREE.ShaderChunk[ "begin_vertex" ],
THREE.ShaderChunk[ "beginnormal_vertex" ],
THREE.ShaderChunk[ "skinbase_vertex" ],
THREE.ShaderChunk[ "skinnormal_vertex" ],
THREE.ShaderChunk[ "defaultnormal_vertex" ],
THREE.ShaderChunk[ "morphtarget_vertex" ],
THREE.ShaderChunk[ "skinning_vertex" ],
THREE.ShaderChunk[ "project_vertex" ],
"#include <begin_vertex>",
"#include <beginnormal_vertex>",
"#include <skinbase_vertex>",
"#include <skinnormal_vertex>",
"#include <defaultnormal_vertex>",
"#include <morphtarget_vertex>",
"#include <skinning_vertex>",
"#include <project_vertex>",

" vNormal = normalize( transformedNormal );",
" vPosition = gl_Position;",
Expand Down Expand Up @@ -2420,21 +2420,21 @@ THREE.ShaderDeferred = {

vertexShader: [

THREE.ShaderChunk[ "uv_pars_vertex" ],
THREE.ShaderChunk[ "morphtarget_pars_vertex" ],
THREE.ShaderChunk[ "skinning_pars_vertex" ],
"#include <uv_pars_vertex>",
"#include <morphtarget_pars_vertex>",
"#include <skinning_pars_vertex>",

"void main() {",

THREE.ShaderChunk[ "uv_vertex" ],
THREE.ShaderChunk[ "begin_vertex" ],
THREE.ShaderChunk[ "beginnormal_vertex" ],
THREE.ShaderChunk[ "skinbase_vertex" ],
THREE.ShaderChunk[ "skinnormal_vertex" ],
THREE.ShaderChunk[ "defaultnormal_vertex" ],
THREE.ShaderChunk[ "morphtarget_vertex" ],
THREE.ShaderChunk[ "skinning_vertex" ],
THREE.ShaderChunk[ "project_vertex" ],
"#include <uv_vertex>",
"#include <begin_vertex>",
"#include <beginnormal_vertex>",
"#include <skinbase_vertex>",
"#include <skinnormal_vertex>",
"#include <defaultnormal_vertex>",
"#include <morphtarget_vertex>",
"#include <skinning_vertex>",
"#include <project_vertex>",

"}"

Expand All @@ -2452,8 +2452,8 @@ THREE.ShaderDeferred = {
"uniform float viewHeight;",
"uniform float viewWidth;",

THREE.ShaderChunk[ "uv_pars_fragment" ],
THREE.ShaderChunk[ "map_pars_fragment" ],
"#include <uv_pars_fragment>",
"#include <map_pars_fragment>",

THREE.DeferredShaderChunk[ "unpackFloat" ],

Expand All @@ -2467,7 +2467,7 @@ THREE.ShaderDeferred = {

" vec4 light = texture2D( samplerLight, texCoord );",

THREE.ShaderChunk[ "map_fragment" ],
"#include <map_fragment>",

" vec3 diffuseFinal = diffuseColor.rgb * light.rgb;",
" vec3 emissiveFinal = emissiveColor;",
Expand Down

0 comments on commit de6b753

Please sign in to comment.