Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
avvy
three.js
Commits
05e9c613
Commit
05e9c613
authored
1 year ago
by
Andrey
Browse files
Options
Download
Email Patches
Plain Diff
AL-14944: new render methods
parent
cedb9d2d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
build/three.cjs
+13
-7
build/three.cjs
build/three.module.js
+13
-7
build/three.module.js
build/three.module.min.js
+1
-1
build/three.module.min.js
src/renderers/WebGLRenderer.js
+12
-6
src/renderers/WebGLRenderer.js
with
39 additions
and
21 deletions
+39
-21
build/three.cjs
View file @
05e9c613
...
...
@@ -14176,7 +14176,7 @@ const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;
const vertex$5 = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n
\t
#define IOR\n
\t
#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n
\t
uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n
\t
uniform float specularIntensity;\n
\t
uniform vec3 specularColor;\n
\t
#ifdef USE_SPECULAR_COLORMAP\n
\t\t
uniform sampler2D specularColorMap;\n
\t
#endif\n
\t
#ifdef USE_SPECULAR_INTENSITYMAP\n
\t\t
uniform sampler2D specularIntensityMap;\n
\t
#endif\n#endif\n#ifdef USE_CLEARCOAT\n
\t
uniform float clearcoat;\n
\t
uniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n
\t
uniform float iridescence;\n
\t
uniform float iridescenceIOR;\n
\t
uniform float iridescenceThicknessMinimum;\n
\t
uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n
\t
uniform vec3 sheenColor;\n
\t
uniform float sheenRoughness;\n
\t
#ifdef USE_SHEEN_COLORMAP\n
\t\t
uniform sampler2D sheenColorMap;\n
\t
#endif\n
\t
#ifdef USE_SHEEN_ROUGHNESSMAP\n
\t\t
uniform sampler2D sheenRoughnessMap;\n
\t
#endif\n#endif\n#ifdef USE_ANISOTROPY\n
\t
uniform vec2 anisotropyVector;\n
\t
#ifdef USE_ANISOTROPYMAP\n
\t\t
uniform sampler2D anisotropyMap;\n
\t
#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n
\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n
\t
vec3 totalEmissiveRadiance = emissive;\n
\t
#include <logdepthbuf_fragment>\n
\t
#include <map_fragment>\n
\t
#include <color_fragment>\n
\t
#include <alphamap_fragment>\n
\t
#include <alphatest_fragment>\n
\t
#include <alphahash_fragment>\n
\t
#include <roughnessmap_fragment>\n
\t
#include <metalnessmap_fragment>\n
\t
#include <normal_fragment_begin>\n
\t
#include <normal_fragment_maps>\n
\t
#include <clearcoat_normal_fragment_begin>\n
\t
#include <clearcoat_normal_fragment_maps>\n
\t
#include <emissivemap_fragment>\n
\t
#include <lights_physical_fragment>\n
\t
#include <lights_fragment_begin>\n
\t
#include <lights_fragment_maps>\n
\t
#include <lights_fragment_end>\n
\t
#include <aomap_fragment>\n
\t
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n
\t
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n
\t
#include <transmission_fragment>\n
\t
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n
\t
#ifdef USE_SHEEN\n
\t\t
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n
\t\t
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n
\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>
\n}";
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n#define IOR\n#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\nuniform float ior;\n#endif\n#ifdef USE_SPECULAR\nuniform float specularIntensity;\nuniform vec3 specularColor;\n#ifdef USE_SPECULAR_COLORMAP\nuniform sampler2D specularColorMap;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\nuniform sampler2D specularIntensityMap;\n#endif\n#endif\n#ifdef USE_CLEARCOAT\nuniform float clearcoat;\nuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\nuniform float iridescence;\nuniform float iridescenceIOR;\nuniform float iridescenceThicknessMinimum;\nuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\nuniform vec3 sheenColor;\nuniform float sheenRoughness;\n#ifdef USE_SHEEN_COLORMAP\nuniform sampler2D sheenColorMap;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\nuniform sampler2D sheenRoughnessMap;\n#endif\n#endif\n#ifdef USE_ANISOTROPY\nuniform vec2 anisotropyVector;\n#ifdef USE_ANISOTROPYMAP\nuniform sampler2D anisotropyMap;\n#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n
#ifndef USE_DEFFERED_SHADING\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n #endif\n #ifdef out_ORM\n #ifdef USE_AOMAP\n out_ORM.x = ambientOcclusion;\n #else\n out_ORM.x = 1.0;\n #endif\n #endif\n vec3 outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n #else\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n
vec3 totalEmissiveRadiance = emissive;\n
#include <logdepthbuf_fragment>\n
#include <map_fragment>\n
#include <color_fragment>\n
#include <alphamap_fragment>\n
#include <alphatest_fragment>\n
#include <alphahash_fragment>\n
#include <roughnessmap_fragment>\n
#include <metalnessmap_fragment>\n
#include <normal_fragment_begin>\n
#include <normal_fragment_maps>\n
#include <clearcoat_normal_fragment_begin>\n
#include <clearcoat_normal_fragment_maps>\n
#include <emissivemap_fragment>\n
#include <lights_physical_fragment>\n
#include <lights_fragment_begin>\n
#include <lights_fragment_maps>\n
#include <lights_fragment_end>\n
#include <aomap_fragment>\n
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n
#include <transmission_fragment>\n
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n
#ifdef USE_SHEEN\n
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n
#endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n #endif
\n}";
const vertex$4 = "#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
...
...
@@ -30539,14 +30539,9 @@ class WebGLRenderer {
};
this.beforeDrawRenderList = function ( renderState, scene, camera ) {
this.drawRenderList = function ( renderList, renderState, scene, camera, viewport ) {
currentRenderList = renderList;
currentRenderState = renderState;
renderListStack.push( currentRenderList );
this.info.render.frame ++;
if ( _clippingEnabled === true ) clipping.beginShadows();
...
...
@@ -30564,6 +30559,17 @@ class WebGLRenderer {
currentRenderState.setupLights( _this._useLegacyLights );
};
this.drawRenderList = function ( renderList, renderState, scene, camera, viewport ) {
currentRenderList = renderList;
currentRenderState = renderState;
renderListStack.push( currentRenderList );
this.info.render.frame ++;
renderScene( currentRenderList, scene, camera, viewport );
if ( _currentRenderTarget !== null ) {
This diff is collapsed.
Click to expand it.
build/three.module.js
View file @
05e9c613
...
...
@@ -14174,7 +14174,7 @@ const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;
const vertex$5 = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}";
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n
\t
#define IOR\n
\t
#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n
\t
uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n
\t
uniform float specularIntensity;\n
\t
uniform vec3 specularColor;\n
\t
#ifdef USE_SPECULAR_COLORMAP\n
\t\t
uniform sampler2D specularColorMap;\n
\t
#endif\n
\t
#ifdef USE_SPECULAR_INTENSITYMAP\n
\t\t
uniform sampler2D specularIntensityMap;\n
\t
#endif\n#endif\n#ifdef USE_CLEARCOAT\n
\t
uniform float clearcoat;\n
\t
uniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n
\t
uniform float iridescence;\n
\t
uniform float iridescenceIOR;\n
\t
uniform float iridescenceThicknessMinimum;\n
\t
uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n
\t
uniform vec3 sheenColor;\n
\t
uniform float sheenRoughness;\n
\t
#ifdef USE_SHEEN_COLORMAP\n
\t\t
uniform sampler2D sheenColorMap;\n
\t
#endif\n
\t
#ifdef USE_SHEEN_ROUGHNESSMAP\n
\t\t
uniform sampler2D sheenRoughnessMap;\n
\t
#endif\n#endif\n#ifdef USE_ANISOTROPY\n
\t
uniform vec2 anisotropyVector;\n
\t
#ifdef USE_ANISOTROPYMAP\n
\t\t
uniform sampler2D anisotropyMap;\n
\t
#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n
\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n
\t
vec3 totalEmissiveRadiance = emissive;\n
\t
#include <logdepthbuf_fragment>\n
\t
#include <map_fragment>\n
\t
#include <color_fragment>\n
\t
#include <alphamap_fragment>\n
\t
#include <alphatest_fragment>\n
\t
#include <alphahash_fragment>\n
\t
#include <roughnessmap_fragment>\n
\t
#include <metalnessmap_fragment>\n
\t
#include <normal_fragment_begin>\n
\t
#include <normal_fragment_maps>\n
\t
#include <clearcoat_normal_fragment_begin>\n
\t
#include <clearcoat_normal_fragment_maps>\n
\t
#include <emissivemap_fragment>\n
\t
#include <lights_physical_fragment>\n
\t
#include <lights_fragment_begin>\n
\t
#include <lights_fragment_maps>\n
\t
#include <lights_fragment_end>\n
\t
#include <aomap_fragment>\n
\t
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n
\t
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n
\t
#include <transmission_fragment>\n
\t
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n
\t
#ifdef USE_SHEEN\n
\t\t
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n
\t\t
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n
\t#endif\n\t
#ifdef USE_CLEARCOAT\n
\t\t
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n
\t\t
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n
\t\t
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n
\t#endif\n\t
#include <opaque_fragment>\n
\t
#include <tonemapping_fragment>\n
\t
#include <colorspace_fragment>\n
\t
#include <fog_fragment>\n
\t
#include <premultiplied_alpha_fragment>\n
\t
#include <dithering_fragment>\n}";
const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n#define IOR\n#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\nuniform float ior;\n#endif\n#ifdef USE_SPECULAR\nuniform float specularIntensity;\nuniform vec3 specularColor;\n#ifdef USE_SPECULAR_COLORMAP\nuniform sampler2D specularColorMap;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\nuniform sampler2D specularIntensityMap;\n#endif\n#endif\n#ifdef USE_CLEARCOAT\nuniform float clearcoat;\nuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\nuniform float iridescence;\nuniform float iridescenceIOR;\nuniform float iridescenceThicknessMinimum;\nuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\nuniform vec3 sheenColor;\nuniform float sheenRoughness;\n#ifdef USE_SHEEN_COLORMAP\nuniform sampler2D sheenColorMap;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\nuniform sampler2D sheenRoughnessMap;\n#endif\n#endif\n#ifdef USE_ANISOTROPY\nuniform vec2 anisotropyVector;\n#ifdef USE_ANISOTROPYMAP\nuniform sampler2D anisotropyMap;\n#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n
#ifndef USE_DEFFERED_SHADING\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n #endif\n #ifdef out_ORM\n #ifdef USE_AOMAP\n out_ORM.x = ambientOcclusion;\n #else\n out_ORM.x = 1.0;\n #endif\n #endif\n vec3 outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n #else\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n
vec3 totalEmissiveRadiance = emissive;\n
#include <logdepthbuf_fragment>\n
#include <map_fragment>\n
#include <color_fragment>\n
#include <alphamap_fragment>\n
#include <alphatest_fragment>\n
#include <alphahash_fragment>\n
#include <roughnessmap_fragment>\n
#include <metalnessmap_fragment>\n
#include <normal_fragment_begin>\n
#include <normal_fragment_maps>\n
#include <clearcoat_normal_fragment_begin>\n
#include <clearcoat_normal_fragment_maps>\n
#include <emissivemap_fragment>\n
#include <lights_physical_fragment>\n
#include <lights_fragment_begin>\n
#include <lights_fragment_maps>\n
#include <lights_fragment_end>\n
#include <aomap_fragment>\n
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n
#include <transmission_fragment>\n
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n
#ifdef USE_SHEEN\n
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n
#endif\n
#ifdef USE_CLEARCOAT\n
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n
#endif\n
#include <opaque_fragment>\n
#include <tonemapping_fragment>\n
#include <colorspace_fragment>\n
#include <fog_fragment>\n
#include <premultiplied_alpha_fragment>\n
#include <dithering_fragment>\n
#endif\n
}";
const vertex$4 = "#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}";
...
...
@@ -30537,14 +30537,9 @@ class WebGLRenderer {
};
this.beforeDrawRenderList = function ( renderState, scene, camera ) {
this.drawRenderList = function ( renderList, renderState, scene, camera, viewport ) {
currentRenderList = renderList;
currentRenderState = renderState;
renderListStack.push( currentRenderList );
this.info.render.frame ++;
if ( _clippingEnabled === true ) clipping.beginShadows();
...
...
@@ -30562,6 +30557,17 @@ class WebGLRenderer {
currentRenderState.setupLights( _this._useLegacyLights );
};
this.drawRenderList = function ( renderList, renderState, scene, camera, viewport ) {
currentRenderList = renderList;
currentRenderState = renderState;
renderListStack.push( currentRenderList );
this.info.render.frame ++;
renderScene( currentRenderList, scene, camera, viewport );
if ( _currentRenderTarget !== null ) {
This diff is collapsed.
Click to expand it.
build/three.module.min.js
View file @
05e9c613
This diff is collapsed.
Click to expand it.
src/renderers/WebGLRenderer.js
View file @
05e9c613
...
...
@@ -1196,14 +1196,9 @@ class WebGLRenderer {
};
this
.
beforeDrawRenderList
=
function
(
renderState
,
scene
,
camera
)
{
this
.
drawRenderList
=
function
(
renderList
,
renderState
,
scene
,
camera
,
viewport
)
{
currentRenderList
=
renderList
;
currentRenderState
=
renderState
;
renderListStack
.
push
(
currentRenderList
);
this
.
info
.
render
.
frame
++
;
if
(
_clippingEnabled
===
true
)
clipping
.
beginShadows
();
...
...
@@ -1221,6 +1216,17 @@ class WebGLRenderer {
currentRenderState
.
setupLights
(
_this
.
_useLegacyLights
);
};
this
.
drawRenderList
=
function
(
renderList
,
renderState
,
scene
,
camera
,
viewport
)
{
currentRenderList
=
renderList
;
currentRenderState
=
renderState
;
renderListStack
.
push
(
currentRenderList
);
this
.
info
.
render
.
frame
++
;
renderScene
(
currentRenderList
,
scene
,
camera
,
viewport
);
if
(
_currentRenderTarget
!==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help