Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jsm/effects/OutlineEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ class OutlineEffect {

' gl_FragColor = vec4( outlineColor, outlineAlpha );',

' #include <fog_fragment>',
' #include <tonemapping_fragment>',
' #include <colorspace_fragment>',
' #include <fog_fragment>',
' #include <premultiplied_alpha_fragment>',

'}'
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/lines/LineMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ ShaderLib[ 'line' ] = {

gl_FragColor = vec4( diffuseColor.rgb, alpha );

#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>

}
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/loaders/LDrawLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ class LDrawConditionalLineMaterial extends ShaderMaterial {
#include <color_fragment>
outgoingLight = diffuseColor.rgb; // simple shader
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}
`,
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/materials/MeshGouraudMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ const GouraudShader = {
#include <envmap_fragment>

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/objects/Water.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ class Water extends Mesh {
vec3 outgoingLight = albedo;
gl_FragColor = vec4( outgoingLight, alpha );

#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
}`

};
Expand Down
2 changes: 1 addition & 1 deletion examples/jsm/objects/Water2.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ Water.WaterShader = {
// multiply water color with the mix of both textures
gl_FragColor = vec4( color, 1.0 ) * mix( refractColor, reflectColor, reflectance );

#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>

}`

Expand Down
Binary file modified examples/screenshots/games_fps.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/misc_controls_map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_animation_skinning_ik.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_buffergeometry.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_buffergeometry_points.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_geometry_dynamic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_geometry_terrain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_geometry_text.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_gpgpu_birds_gltf.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_loader_md2_control.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_loader_ttf.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_lod.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_materials_texture_filters.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_points_billboards.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_sprites.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/linedashed.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void main() {
outgoingLight = diffuseColor.rgb; // simple shader

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>

}
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshbasic.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ void main() {
#include <envmap_fragment>

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshlambert.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ void main() {

#include <envmap_fragment>
#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshmatcap.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ void main() {
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshphong.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ void main() {

#include <envmap_fragment>
#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshphysical.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ void main() {
#endif

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/meshtoon.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ void main() {
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/points.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ void main() {
outgoingLight = diffuseColor.rgb;

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>

}
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/shadow.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ void main() {

gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );

#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>

}
`;
2 changes: 1 addition & 1 deletion src/renderers/shaders/ShaderLib/sprite.glsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ void main() {
outgoingLight = diffuseColor.rgb;

#include <opaque_fragment>
#include <fog_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>

}
`;
4 changes: 2 additions & 2 deletions src/renderers/webgl/WebGLMaterials.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BackSide } from '../../constants.js';
import { getUnlitUniformColorSpace } from '../shaders/UniformsUtils.js';
import { ColorManagement } from '../../math/ColorManagement.js';

function WebGLMaterials( renderer, properties ) {

Expand All @@ -17,7 +17,7 @@ function WebGLMaterials( renderer, properties ) {

function refreshFogUniforms( uniforms, fog ) {

fog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) );
fog.color.getRGB( uniforms.fogColor.value, ColorManagement.workingColorSpace );

if ( fog.isFog ) {

Expand Down