🚚 Move uForOpening to standard uniforms

This commit is contained in:
Simon Schneegans
2022-05-11 05:44:36 +02:00
parent 2bd897fe0e
commit 2eca2c7374
15 changed files with 28 additions and 55 deletions
-3
View File
@@ -167,7 +167,6 @@ if (utils.isInShellProcess()) {
shardData.width, shardData.height, shardData.rowstride);
}
this._uForOpening = this.get_uniform_location('uForOpening');
this._uShardTexture = this.get_uniform_location('uShardTexture');
this._uSeed = this.get_uniform_location('uSeed');
this._uEpicenter = this.get_uniform_location('uEpicenter');
@@ -198,7 +197,6 @@ if (utils.isInShellProcess()) {
const testMode = settings.get_boolean('test-mode');
// clang-format off
this.set_uniform_float(this._uForOpening, 1, [forOpening]);
this.set_uniform_float(this._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
this.set_uniform_float(this._uEpicenter, 2, [epicenterX, epicenterY]);
this.set_uniform_float(this._uShardScale, 1, [settings.get_double('broken-glass-scale')]);
@@ -220,7 +218,6 @@ if (utils.isInShellProcess()) {
// Inject some common shader snippets.
${shaderSnippets.standardUniforms()}
uniform bool uForOpening;
uniform sampler2D uShardTexture;
uniform vec2 uSeed;
uniform vec2 uEpicenter;