#define PHONG out vec3 vViewPosition; #ifndef FLAT_SHADED out vec3 vNormal; #endif #include common #include map_pars_vertex #include lightmap_pars_vertex #include envmap_pars_vertex #include lights_phong_pars_vertex #include color_pars_vertex #include morphtarget_pars_vertex #include skinning_pars_vertex #include shadowmap_pars_vertex #include logdepthbuf_pars_vertex void main() { #include map_vertex #include lightmap_vertex #include color_vertex #include morphnormal_vertex #include skinbase_vertex #include skinnormal_vertex #include defaultnormal_vertex #ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED vNormal = normalize( transformedNormal ); #endif #include morphtarget_vertex #include skinning_vertex #include default_vertex #include logdepthbuf_vertex vViewPosition = -mvPosition.xyz; #include worldpos_vertex #include envmap_vertex #include lights_phong_vertex #include shadowmap_vertex }