Fixed filters for new shader code.

This commit is contained in:
photonstorm
2013-11-28 21:29:16 +00:00
parent f22159e257
commit b2fc6c422a
50 changed files with 863 additions and 408 deletions
+8
View File
@@ -178,10 +178,18 @@
}
],
"filters": [
{
"file": "checker+wave.js",
"title": "checker wave"
},
{
"file": "fire.js",
"title": "fire"
},
{
"file": "hue+rotate.js",
"title": "hue rotate"
},
{
"file": "lightbeams.js",
"title": "lightbeams"
-2
View File
@@ -95,8 +95,6 @@ $(document).ready(function(){
.done(function(data) {
console.log(data);
if (data.version !== '1.1.3')
{
$("#upgrade").append(data.version);
-2
View File
@@ -58,8 +58,6 @@ $(document).ready(function(){
.done(function(data) {
console.log(data);
if (data.version !== '1.1.3')
{
$("#upgrade").append(data.version);
+37
View File
@@ -0,0 +1,37 @@
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create, update: update });
var background;
var filter;
function preload() {
game.load.image('s', 'assets/pics/undersea.jpg');
game.load.image('phaser', 'assets/sprites/phaser.png');
game.load.script('filter', '../filters/CheckerWave.js');
}
function create() {
game.add.sprite(0, 0, 's');
background = game.add.sprite(0, 0);
background.width = 800;
background.height = 600;
filter = game.add.filter('CheckerWave', 800, 600);
filter.alpha = 0.2;
background.filters = [filter];
var logo = game.add.sprite(game.world.centerX, 100, 'phaser');
logo.anchor.setTo(0.5, 0.5);
}
function update() {
filter.update();
}
+1 -1
View File
@@ -7,7 +7,7 @@ var filter;
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('fire', '../filters/Fire.js');
game.load.script('filter', '../filters/Fire.js');
}
+38
View File
@@ -0,0 +1,38 @@
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create, update: update });
var background;
var filter;
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('filter', '../filters/HueRotate.js');
// game.load.image('texture', 'assets/textures/ooze.png');
game.load.image('texture', 'assets/pics/ra_einstein.png');
}
function create() {
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'texture');
logo.anchor.setTo(0.5, 0.5);
logo.texture.baseTexture._powerOf2 = true;
background = game.add.sprite(0, 0);
background.width = logo.width;
background.height = logo.height;
filter = game.add.filter('HueRotate', logo.width, logo.height, logo.texture);
// filter.alpha = 0.0;
background.filters = [filter];
}
function update() {
filter.update();
}
+1 -1
View File
@@ -7,7 +7,7 @@ var filter;
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('light', '../filters/LightBeam.js');
game.load.script('filter', '../filters/LightBeam.js');
}
+1 -1
View File
@@ -7,7 +7,7 @@ var filter;
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('plasma', '../filters/Plasma.js');
game.load.script('filter', '../filters/Plasma.js');
}
+1 -1
View File
@@ -8,7 +8,7 @@ function preload() {
game.load.image('phaser', 'assets/sprites/phaser.png');
game.load.image('texture', 'assets/textures/ooze.png');
game.load.script('tunnel', '../filters/Tunnel.js');
game.load.script('filter', '../filters/Tunnel.js');
}
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.TRSIPlasmaFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Shader by Rebb / TRSI (https://www.shadertoy.com/view/XdX3Wn)
-2
View File
@@ -9,10 +9,8 @@
margin: 0;
}
</style>
// <script src="phaser.js"></script>
<script src="../../../dist/phaser.min.js" type="text/javascript"></script>
<script src="../../../filters/ColorBars.js" type="text/javascript"></script>
<script src="../../../filters/BinarySerpents.js" type="text/javascript"></script>
<script src="../../../filters/Fire.js" type="text/javascript"></script>
</head>
<body>
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.C64PlasmaFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Shader by ssdsa (https://www.shadertoy.com/view/MslGzN)
+125
View File
@@ -0,0 +1,125 @@
PIXI.BinarySerpentsFilter = function(width, height, texture)
{
PIXI.AbstractFilter.call( this );
this.passes = [this];
var d = new Date();
var dates = [
d.getFullYear(), // the year (four digits)
d.getMonth(), // the month (from 0-11)
d.getDate(), // the day of the month (from 1-31)
d.getHours()*60.0*60 + d.getMinutes()*60 + d.getSeconds()
];
this.uniforms = {
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
this.fragmentSrc = [
"#ifdef GL_ES",
"precision mediump float;",
"#endif",
"//Ashok Gowtham M",
"//UnderWater Caustic lights",
"uniform float time;",
"uniform vec2 mouse;",
"uniform vec2 resolution;",
"//normalized sin",
"float sinn(float x)",
"{",
"return sin(x)/2.+.001;",
"}",
"float CausticPatternFn(vec2 pos)",
"{",
"return (sin(pos.x*40.+time)",
"+pow(sin(-pos.x*130.+time),1.)",
"+pow(sin(pos.x*30.+time),2.)",
"+pow(sin(pos.x*50.+time),2.)",
"+pow(sin(pos.x*80.+time),2.)",
"+pow(sin(pos.x*90.+time),2.)",
"+pow(sin(pos.x*12.+time),2.)",
"+pow(sin(pos.x*6.+time),2.)",
"+pow(sin(-pos.x*13.+time),5.))/2.;",
"}",
"vec2 CausticDistortDomainFn(vec2 pos)",
"{",
"pos.x*=(pos.y*0.60+1.);",
"pos.x*=1.+sin(time/2.)/10.;",
"return pos;",
"}",
"void main( void )",
"{",
"vec2 pos = gl_FragCoord.xy/resolution;",
"pos-=.5;",
"vec2 CausticDistortedDomain = CausticDistortDomainFn(pos);",
"float CausticShape = clamp(7.-length(CausticDistortedDomain.x*20.),0.,1.);",
"float CausticPattern = CausticPatternFn(CausticDistortedDomain);",
"float CausticOnFloor = CausticPatternFn(pos)+sin(pos.y*100.)*clamp(2.-length(pos*2.),0.,1.);",
"float Caustic;",
"Caustic += CausticShape*CausticPattern;",
"Caustic *= (pos.y+.5)/4.;",
"//Caustic += CausticOnFloor;",
"float f = length(pos+vec2(-.5,.5))*length(pos+vec2(.5,.5))*(1.+Caustic)/1.;",
"gl_FragColor = vec4(.1,.5,.6,1)*(f);",
"}"];
}
PIXI.BinarySerpentsFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
PIXI.BinarySerpentsFilter.prototype.constructor = PIXI.BinarySerpentsFilter;
Object.defineProperty(PIXI.BinarySerpentsFilter.prototype, 'iGlobalTime', {
get: function() {
return this.uniforms.iGlobalTime.value;
},
set: function(value) {
this.uniforms.iGlobalTime.value = value;
}
});
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render });
function preload() {
game.load.image('texture', 'wip/tex01.jpg');
}
var filter;
var sprite;
function create() {
sprite = game.add.sprite(0, 0, 'texture');
sprite.width = 800;
sprite.height = 600;
filter = new PIXI.BinarySerpentsFilter(sprite.width, sprite.height, sprite.texture);
sprite.filters = [filter];
}
function update() {
filter.iGlobalTime = game.time.totalElapsedSeconds();
filter.uniforms.iMouse.value.x = game.input.x;
filter.uniforms.iMouse.value.y = game.input.y;
}
function render() {
}
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.CheckerWaveFilter = function(width, height, texture)
];
this.uniforms = {
resolution: { type: 'f2', value: { x: width, y: height }},
mouse: { type: 'f2', value: { x: 0, y: 0 }},
time: { type: 'f', value: 1 }
resolution: { type: '2f', value: { x: width, y: height }},
mouse: { type: '2f', value: { x: 0, y: 0 }},
time: { type: '1f', value: 1 }
};
// http://glsl.heroku.com/e#12260.0
+5 -4
View File
@@ -14,10 +14,10 @@ PIXI.DeformStarFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by iq (https://www.shadertoy.com/view/4dXGRn)
@@ -79,6 +79,7 @@ function preload() {
// game.load.image('texture', 'wip/64x64.png');
game.load.image('texture', 'wip/tex08.jpg');
game.load.image('texture2', 'assets/textures/alice.jpg');
}
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.RayTracedBallsFilter = function(width, height, texture)
];
this.uniforms = {
resolution: { type: 'f2', value: { x: width, y: height }},
mouse: { type: 'f2', value: { x: 0, y: 0 }},
time: { type: 'f', value: 1 }
resolution: { type: '2f', value: { x: width, y: height }},
mouse: { type: '2f', value: { x: 0, y: 0 }},
time: { type: '1f', value: 1 }
};
// http://glsl.heroku.com/e#12288.0
+4 -4
View File
@@ -14,9 +14,9 @@ PIXI.HueRotationFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture }
};
@@ -36,7 +36,7 @@ PIXI.HueRotationFilter = function(width, height, texture)
"http://beesbuzz.biz/code/hsv_color_transforms.php",
"*/",
"#define SPEED 10.0",
"#define SPEED 1.0",
"void main(void)",
"{",
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.HypnoticRipplesFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture }
};
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.IcosohedronFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture }
};
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.MengerTunnelFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.MetaBallsFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.MysteryVortexFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel1: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
+5 -5
View File
@@ -14,11 +14,11 @@ PIXI.PlaneDeformationFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by cce (https://www.shadertoy.com/view/XsXGWM)
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.Plasma3DFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Shader by Optimus (https://www.shadertoy.com/view/Mss3zn)
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.PlasmaBeamFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Shader by 4rknova (https://www.shadertoy.com/view/Xsl3WH)
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.PulsingInterferenceFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.RetroPlasmaFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Oldskool plasm shader. (c) Victor Korsun, bitekas@gmail.com; 1996-2013.
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.RotationalFractalsFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
};
+5 -5
View File
@@ -14,11 +14,11 @@ PIXI.RotoZoomerFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'nearest-repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by triggerHLM (https://www.shadertoy.com/view/lsfGDH)
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.SineWaveFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by Kali (https://www.shadertoy.com/view/4dfGDM)
+5 -5
View File
@@ -14,11 +14,11 @@ PIXI.SineWaveFixedBaseFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iMouse: { type: 'f3', value: { x: 0, y: 0, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iMouse: { type: '3f', value: { x: 0, y: 0, z: 0 }},
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by BrokenBit (https://www.shadertoy.com/view/MsXGzX)
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.StarNestFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture }
};
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.StarNurseryFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by Dave Hoskins (https://www.shadertoy.com/view/XsfGzH)
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.StarFieldFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by Rebb / TRSI (https://www.shadertoy.com/view/XdX3Wn)
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.StarsBackgroundFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture }
};
+3 -3
View File
@@ -14,9 +14,9 @@ PIXI.TrippyLinesFilter = function(width, height)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates }
};
// Shader by aji (https://www.shadertoy.com/view/lslGRj)
+4 -4
View File
@@ -14,10 +14,10 @@ PIXI.VortexFilter = function(width, height, texture)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture, textureData: { repeat: true } }
};
// Shader by GhettoWolf (https://www.shadertoy.com/view/Xdl3WH)
+5 -5
View File
@@ -14,11 +14,11 @@ PIXI.WobbleFilter = function(width, height, texture0, texture1)
];
this.uniforms = {
iResolution: { type: 'f3', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: 'f', value: 1 },
iDate: { type: 'f4', value: dates },
iChannel0: { type: 'sampler2D', value: texture0, wrap: 'repeat' },
iChannel1: { type: 'sampler2D', value: texture1, wrap: 'repeat' }
iResolution: { type: '3f', value: { x: width, y: height, z: 0 }},
iGlobalTime: { type: '1f', value: 1 },
iDate: { type: '4fv', value: dates },
iChannel0: { type: 'sampler2D', value: texture0, textureData: { repeat: true } },
iChannel1: { type: 'sampler2D', value: texture1, textureData: { repeat: true } }
};
// Shader by deps (https://www.shadertoy.com/view/MssGDM)