Skip to content

Commit

Permalink
Merge branch 'dev' into v7
Browse files Browse the repository at this point in the history
  • Loading branch information
vanruesc committed Mar 10, 2024
2 parents 16104d2 + e758f65 commit b750554
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/utils/BackCompat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { REVISION } from "three";

const revision = Number(REVISION.replace(/\D+/g, ""));

/**
* Updates the given fragment shader for the current version of three.
*
* @param {String} fragmentShader - A fragment shader.
* @return {String} The modified fragment shader.
* @ignore
*/

export function updateFragmentShader(fragmentShader) {

if(revision < 154) {

return fragmentShader.replace("colorspace_fragment", "encodings_fragment");

}

return fragmentShader;

}

0 comments on commit b750554

Please sign in to comment.