commit fonctionne ou pas ?

This commit is contained in:
val
2022-11-30 17:27:28 +01:00
commit e9dd38c3a8
3397 changed files with 593718 additions and 0 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,50 @@
(function(Blotter) {
Blotter.LiquidDistortMaterial = function() {
Blotter.Material.apply(this, arguments);
};
Blotter.LiquidDistortMaterial.prototype = Object.create(Blotter.Material.prototype);
Blotter._extendWithGettersSetters(Blotter.LiquidDistortMaterial.prototype, (function () {
function _mainImageSrc () {
var mainImageSrc = [
Blotter.Assets.Shaders.Noise3D,
"void mainImage( out vec4 mainImage, in vec2 fragCoord )",
"{",
" // Setup ========================================================================",
" vec2 uv = fragCoord.xy / uResolution.xy;",
" float z = uSeed + uGlobalTime * uSpeed;",
" uv += snoise(vec3(uv, z)) * uVolatility;",
" mainImage = textTexture(uv);",
"}"
].join("\n");
return mainImageSrc;
}
return {
constructor : Blotter.LiquidDistortMaterial,
init : function () {
this.mainImage = _mainImageSrc();
this.uniforms = {
uSpeed : { type : "1f", value : 1.0 },
uVolatility : { type : "1f", value : 0.15 },
uSeed : { type : "1f", value : 0.1 }
};
}
};
})());
})(
this.Blotter
);