Skip to content

Commit dcaf710

Browse files
committed
Invert back-compat logic
1 parent 162076e commit dcaf710

File tree

9 files changed

+10
-13
lines changed

9 files changed

+10
-13
lines changed

src/materials/GodRaysMaterial.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { NoBlending, ShaderMaterial, Uniform } from "three";
2-
import { updateFragmentShader } from "../utils";
32

43
import fragmentShader from "./glsl/convolution.god-rays.frag";
54
import vertexShader from "./glsl/common.vert";
@@ -51,8 +50,6 @@ export class GodRaysMaterial extends ShaderMaterial {
5150
vertexShader
5251
});
5352

54-
this.fragmentShader = updateFragmentShader(this.fragmentShader);
55-
5653
}
5754

5855
/**

src/materials/glsl/convolution.downsampling.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ void main() {
7676
c += WEIGHT_OUTER * texture2D(inputBuffer, vUv);
7777
gl_FragColor = c;
7878

79-
#include <encodings_fragment>
79+
#include <colorspace_fragment>
8080

8181
}

src/materials/glsl/convolution.gaussian.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ void main() {
2828

2929
gl_FragColor = result;
3030

31-
#include <encodings_fragment>
31+
#include <colorspace_fragment>
3232

3333
}

src/materials/glsl/convolution.kawase.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ void main() {
2121
sum += texture2D(inputBuffer, vUv3); // Bottom left
2222
gl_FragColor = sum * 0.25; // Compute the average
2323

24-
#include <encodings_fragment>
24+
#include <colorspace_fragment>
2525

2626
}

src/materials/glsl/convolution.tilt-shift.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ void main() {
3030
sum += texture2D(inputBuffer, vec2(vUv.x - dUv.x, vUv.y - dUv.y)); // Bottom left
3131
gl_FragColor = sum * 0.25; // Compute the average
3232

33-
#include <encodings_fragment>
33+
#include <colorspace_fragment>
3434

3535
}

src/materials/glsl/convolution.upsampling.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ void main() {
3939
vec4 baseColor = texture2D(supportBuffer, vUv);
4040
gl_FragColor = mix(baseColor, c, radius);
4141

42-
#include <encodings_fragment>
42+
#include <colorspace_fragment>
4343

4444
}

src/materials/glsl/copy.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void main() {
2020
vec4 texel = texture2D(inputBuffer, vUv);
2121
gl_FragColor = opacity * texel;
2222

23-
#include <encodings_fragment>
23+
#include <colorspace_fragment>
2424
#include <dithering_fragment>
2525

2626
}

src/materials/glsl/effect.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void main() {
143143

144144
#ifdef ENCODE_OUTPUT
145145

146-
#include <encodings_fragment>
146+
#include <colorspace_fragment>
147147

148148
#endif
149149

src/utils/BackCompat.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ export function copyTextureColorSpace(src, dest) {
103103
* @ignore
104104
*/
105105

106-
export function updateFragmentShader(fragmentShader, vertexShader) {
106+
export function updateFragmentShader(fragmentShader) {
107107

108-
if(revision >= 154) {
108+
if(revision < 154) {
109109

110-
return fragmentShader.replace("encodings_fragment", "colorspace_fragment");
110+
return fragmentShader.replace("colorspace_fragment", "encodings_fragment");
111111

112112
}
113113

0 commit comments

Comments
 (0)