This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// json is a JSON atlas generated by TexturePacker | |
// imagepath is a url to the full texture atlas image | |
var atlasTexture = THREE.ImageUtils.loadTexture( imagepath, undefined, function() { | |
for (var key in json.frames) { | |
var tex = atlasTexture.clone(); | |
var frame = json.frames[key].frame; | |
tex.repeat.x = ( frame.w / atlasTexture.image.width ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varying highp vec2 textureCoordinate; | |
uniform sampler2D inputImageTexture; | |
uniform highp float division; | |
uniform int mode; | |
void main() | |
{ | |
if(mode == 0) { | |
// Bypass | |
gl_FragColor = texture2D(inputImageTexture, textureCoordinate); |
NewerOlder