From 336ad8bae265e65174a169c6f24e295ce0b97315 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Sat, 21 May 2022 10:11:49 +0200 Subject: [PATCH 1/2] WebGLRenderer: Rename outputEncoding to outputColorSpace. --- docs/api/en/renderers/WebGLRenderer.html | 8 ++++---- docs/api/zh/renderers/WebGLRenderer.html | 4 ++-- docs/examples/en/loaders/GLTFLoader.html | 2 +- docs/examples/zh/loaders/GLTFLoader.html | 2 +- docs/manual/en/introduction/Color-management.html | 6 +++--- docs/scenes/material-browser.html | 2 +- editor/js/Sidebar.Project.Renderer.js | 2 +- editor/js/libs/app.js | 2 +- editor/js/libs/ui.three.js | 2 +- examples/games_fps.html | 2 +- examples/js/objects/Reflector.js | 2 +- examples/js/objects/ReflectorForSSRPass.js | 2 +- examples/js/objects/Refractor.js | 2 +- examples/jsm/nodes/materials/NodeMaterial.js | 2 +- examples/jsm/objects/Reflector.js | 2 +- examples/jsm/objects/ReflectorForSSRPass.js | 2 +- examples/jsm/objects/Refractor.js | 2 +- examples/jsm/renderers/webgpu/WebGPURenderer.js | 4 ++-- examples/misc_controls_arcball.html | 2 +- examples/misc_exporter_collada.html | 2 +- examples/misc_exporter_obj.html | 2 +- examples/misc_exporter_ply.html | 2 +- examples/misc_exporter_usdz.html | 2 +- examples/physics_ammo_instancing.html | 2 +- examples/physics_oimo_instancing.html | 2 +- examples/webaudio_orientation.html | 2 +- examples/webgl_animation_keyframes.html | 2 +- examples/webgl_animation_multiple.html | 2 +- examples/webgl_animation_skinning_additive_blending.html | 2 +- examples/webgl_animation_skinning_blending.html | 2 +- examples/webgl_animation_skinning_morph.html | 2 +- examples/webgl_buffergeometry.html | 2 +- examples/webgl_buffergeometry_drawrange.html | 2 +- examples/webgl_buffergeometry_lines.html | 2 +- examples/webgl_buffergeometry_lines_indexed.html | 2 +- examples/webgl_buffergeometry_uint.html | 2 +- examples/webgl_furnace_test.html | 4 ++-- examples/webgl_geometry_teapot.html | 2 +- examples/webgl_instancing_modified.html | 2 +- examples/webgl_instancing_performance.html | 2 +- examples/webgl_lensflares.html | 2 +- examples/webgl_lightningstrike.html | 2 +- examples/webgl_lightprobe.html | 2 +- examples/webgl_lightprobe_cubecamera.html | 2 +- examples/webgl_lights_hemisphere.html | 2 +- examples/webgl_lights_physical.html | 2 +- examples/webgl_lights_rectarealight.html | 2 +- examples/webgl_lights_spotlight.html | 2 +- examples/webgl_lights_spotlights.html | 2 +- examples/webgl_loader_3dm.html | 2 +- examples/webgl_loader_3ds.html | 2 +- examples/webgl_loader_3mf_materials.html | 2 +- examples/webgl_loader_collada.html | 2 +- examples/webgl_loader_collada_kinematics.html | 2 +- examples/webgl_loader_collada_skinning.html | 2 +- examples/webgl_loader_draco.html | 2 +- examples/webgl_loader_gltf.html | 2 +- examples/webgl_loader_gltf_compressed.html | 2 +- examples/webgl_loader_gltf_sheen.html | 2 +- examples/webgl_loader_gltf_transmission.html | 2 +- examples/webgl_loader_gltf_variants.html | 2 +- examples/webgl_loader_kmz.html | 2 +- examples/webgl_loader_ldraw.html | 2 +- examples/webgl_loader_lwo.html | 2 +- examples/webgl_loader_md2.html | 2 +- examples/webgl_loader_md2_control.html | 2 +- examples/webgl_loader_obj_mtl.html | 2 +- examples/webgl_loader_ply.html | 2 +- examples/webgl_loader_stl.html | 2 +- examples/webgl_loader_svg.html | 2 +- examples/webgl_loader_texture_exr.html | 2 +- examples/webgl_loader_texture_hdr.html | 2 +- examples/webgl_loader_texture_ktx2.html | 2 +- examples/webgl_loader_texture_logluv.html | 2 +- examples/webgl_loader_texture_rgbm.html | 2 +- examples/webgl_marchingcubes.html | 2 +- examples/webgl_materials_bumpmap.html | 2 +- examples/webgl_materials_car.html | 2 +- examples/webgl_materials_cubemap_dynamic.html | 2 +- examples/webgl_materials_displacementmap.html | 2 +- examples/webgl_materials_envmaps.html | 2 +- examples/webgl_materials_envmaps_exr.html | 2 +- examples/webgl_materials_envmaps_hdr.html | 2 +- examples/webgl_materials_lightmap.html | 2 +- examples/webgl_materials_matcap.html | 2 +- examples/webgl_materials_normalmap_object_space.html | 2 +- examples/webgl_materials_physical_clearcoat.html | 2 +- examples/webgl_materials_physical_reflectivity.html | 2 +- examples/webgl_materials_physical_transmission.html | 2 +- examples/webgl_materials_standard.html | 2 +- examples/webgl_materials_standard_nodes.html | 2 +- examples/webgl_materials_subsurface_scattering.html | 2 +- examples/webgl_materials_variations_basic.html | 2 +- examples/webgl_materials_variations_lambert.html | 2 +- examples/webgl_materials_variations_phong.html | 2 +- examples/webgl_materials_variations_physical.html | 2 +- examples/webgl_materials_variations_standard.html | 2 +- examples/webgl_materials_variations_toon.html | 2 +- examples/webgl_morphtargets_face.html | 2 +- examples/webgl_morphtargets_horse.html | 2 +- examples/webgl_nodes_playground.html | 2 +- examples/webgl_pmrem_test.html | 2 +- examples/webgl_portal.html | 2 +- examples/webgl_shaders_sky.html | 2 +- examples/webgl_shadowmap.html | 2 +- examples/webgl_shadowmap_pcss.html | 2 +- examples/webgl_shadowmap_performance.html | 2 +- examples/webgl_tonemapping.html | 2 +- examples/webgpu_lights_selective.html | 2 +- examples/webgpu_nodes_playground.html | 2 +- examples/webgpu_skinning.html | 2 +- examples/webgpu_skinning_instancing.html | 2 +- examples/webxr_ar_lighting.html | 2 +- examples/webxr_vr_ballshooter.html | 2 +- examples/webxr_vr_cubes.html | 2 +- examples/webxr_vr_dragging.html | 2 +- examples/webxr_vr_handinput.html | 2 +- examples/webxr_vr_handinput_cubes.html | 2 +- examples/webxr_vr_handinput_pointerclick.html | 2 +- examples/webxr_vr_handinput_pointerdrag.html | 2 +- examples/webxr_vr_handinput_pressbutton.html | 2 +- examples/webxr_vr_handinput_profiles.html | 2 +- examples/webxr_vr_haptics.html | 2 +- examples/webxr_vr_layers.html | 2 +- examples/webxr_vr_paint.html | 2 +- examples/webxr_vr_sculpt.html | 2 +- examples/webxr_vr_teleport.html | 2 +- manual/examples/background-v01.html | 2 +- manual/examples/background.html | 2 +- manual/examples/cleanup-loaded-files.html | 2 +- manual/examples/game-check-animations.html | 2 +- manual/examples/game-conga-line-w-notes.html | 2 +- manual/examples/game-conga-line.html | 2 +- manual/examples/game-just-player.html | 2 +- manual/examples/game-load-models.html | 2 +- manual/examples/game-player-input.html | 2 +- manual/examples/load-gltf-animated-cars.html | 2 +- manual/examples/load-gltf-car-path-fixed.html | 2 +- manual/examples/load-gltf-car-path.html | 2 +- manual/examples/load-gltf-dump-scenegraph-extra.html | 2 +- manual/examples/load-gltf-dump-scenegraph.html | 2 +- manual/examples/load-gltf-rotate-cars-fixed.html | 2 +- manual/examples/load-gltf-rotate-cars.html | 2 +- manual/examples/load-gltf-shadows.html | 2 +- manual/examples/load-gltf.html | 2 +- manual/examples/load-obj-auto-camera-xz.html | 2 +- manual/examples/load-obj-auto-camera.html | 2 +- manual/examples/load-obj-materials-fixed.html | 2 +- manual/examples/load-obj-materials-windmill2.html | 2 +- manual/examples/load-obj-materials.html | 2 +- manual/examples/load-obj-no-materials.html | 2 +- manual/examples/load-obj-wat.html | 2 +- manual/examples/postprocessing-3dlut-prep.html | 2 +- src/renderers/WebGLRenderer.js | 8 ++++---- src/renderers/webgl/WebGLProgram.js | 2 +- src/renderers/webgl/WebGLPrograms.js | 6 +++--- src/renderers/webxr/WebXRManager.js | 6 +++--- 157 files changed, 172 insertions(+), 172 deletions(-) diff --git a/docs/api/en/renderers/WebGLRenderer.html b/docs/api/en/renderers/WebGLRenderer.html index e1a4b41a623129..0e208dfb3a449b 100644 --- a/docs/api/en/renderers/WebGLRenderer.html +++ b/docs/api/en/renderers/WebGLRenderer.html @@ -98,7 +98,7 @@

[property:Boolean autoClearStencil]

[property:Object debug]

- - [page:Boolean checkShaderErrors]: + - [page:Boolean checkShaderErrors]: If it is true, defines whether material shader programs are checked for errors during compilation and linkage process. It may be useful to disable this check in production for performance gain. It is strongly recommended to keep these checks enabled during development. @@ -155,7 +155,7 @@

[property:DOMElement domElement]

[property:Object extensions]

- - [page:Object get]( [param:String extensionName] ): + - [page:Object get]( [param:String extensionName] ): Used to check whether various extensions are supported and returns an object with details of the extension if available. This method can check for the following extensions:
@@ -168,8 +168,8 @@

[property:Object extensions]

-

[property:number outputEncoding]

-

Defines the output encoding of the renderer. Default is [page:Textures THREE.LinearEncoding].

+

[property:number outputColorSpace]

+

Defines the output colorspace of the renderer. Default is [page:Textures THREE.LinearEncoding].

If a render target has been set using [page:WebGLRenderer.setRenderTarget .setRenderTarget] then renderTarget.texture.encoding will be used instead.

See the [page:Textures texture constants] page for details of other formats.

diff --git a/docs/api/zh/renderers/WebGLRenderer.html b/docs/api/zh/renderers/WebGLRenderer.html index c7624291247718..a3c457184cb736 100644 --- a/docs/api/zh/renderers/WebGLRenderer.html +++ b/docs/api/zh/renderers/WebGLRenderer.html @@ -133,7 +133,7 @@

[property:DOMElement domElement]

[property:Object extensions]

- - [page:Object get]( [param:String extensionName] ): + - [page:Object get]( [param:String extensionName] ): 用于检查是否支持各种扩展,并返回一个对象,其中包含扩展的详细信息。 该方法检查以下扩展:
@@ -146,7 +146,7 @@

[property:Object extensions]

-

[property:number outputEncoding]

+

[property:number outputColorSpace]

定义渲染器的输出编码。默认为[page:Textures THREE.LinearEncoding]

如果渲染目标已经使用 [page:WebGLRenderer.setRenderTarget .setRenderTarget]、之后将直接使用renderTarget.texture.encoding

查看[page:Textures texture constants]页面以获取其他格式细节

diff --git a/docs/examples/en/loaders/GLTFLoader.html b/docs/examples/en/loaders/GLTFLoader.html index 57b8cbcc11cfce..e26a0f6aae3e26 100644 --- a/docs/examples/en/loaders/GLTFLoader.html +++ b/docs/examples/en/loaders/GLTFLoader.html @@ -133,7 +133,7 @@

Textures

in linear colorspace, always configure [page:WebGLRenderer] as follows when using glTF:

- renderer.outputEncoding = THREE.sRGBEncoding; + renderer.outputColorSpace = THREE.sRGBEncoding;

GLTFLoader will automatically configure textures referenced from a .gltf or .glb file correctly, with the diff --git a/docs/examples/zh/loaders/GLTFLoader.html b/docs/examples/zh/loaders/GLTFLoader.html index 725d3f16aaeb3c..b36722080547ce 100644 --- a/docs/examples/zh/loaders/GLTFLoader.html +++ b/docs/examples/zh/loaders/GLTFLoader.html @@ -129,7 +129,7 @@

纹理

颜色空间并显示在屏幕上。除非你需要使用线性颜色空间进行后期处理,否则请在使用glTF的时候将[page:WebGLRenderer]进行如下配置:

- renderer.outputEncoding = THREE.sRGBEncoding; + renderer.outputColorSpace = THREE.sRGBEncoding;

假设渲染器的配置如上所示,则GLTFLoader将可以正确地自动配置从.gltf或.glb文件中引用的纹理。 diff --git a/docs/manual/en/introduction/Color-management.html b/docs/manual/en/introduction/Color-management.html index b5ee0a3c36386c..ad8383eaa37661 100644 --- a/docs/manual/en/introduction/Color-management.html +++ b/docs/manual/en/introduction/Color-management.html @@ -192,7 +192,7 @@

Input color space

⚠️ WARNING: [page:Scene.fog], [page:Scene.background], and [page:WebGLRenderer.setClearColor] - are exceptions to the rule. These properties are unaffected by [page:WebGLRenderer.outputEncoding] + are exceptions to the rule. These properties are unaffected by [page:WebGLRenderer.outputColorSpace] and so must store RGB components in the renderer's output color space.

@@ -219,11 +219,11 @@

Output color space

Output to a display device, image, or video may involve conversion from the open domain Linear-sRGB working color space to another color space. This conversion may be performed in - the main render pass ([page:WebGLRenderer.outputEncoding]), or during post-processing. + the main render pass ([page:WebGLRenderer.outputColorSpace]), or during post-processing.

-renderer.outputEncoding = THREE.sRGBEncoding; // optional with post-processing +renderer.outputColorSpace = THREE.sRGBEncoding; // optional with post-processing