Skip to content

Instantly share code, notes, and snippets.

Omar Juarez omarojo

Block or report user

Report or block omarojo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View GlitchShader.metal
// G8Shaders.metal
// GenerateMetal-iOS
// Created by Omar Juarez Ortiz on 2019-02-25.
// Copyright © 2019 Generate Software Inc. All rights reserved.
#include <metal_stdlib>
#include "MTIShaderLib.h"
omarojo / VideoMediaInput.swift
Last active Sep 26, 2019
How to use MTAudioProcessingTap in Swift 4.2
View VideoMediaInput.swift
// VideoMediaInput.swift
// GenerateMetal-iOS
// Created by Omar Juarez Ortiz on 2018-11-28.
// Copyright © 2018 All rights reserved.
import Foundation
import UIKit
omarojo / script.js
Created Jun 14, 2018
Animate an Object
View script.js
// ----------- API -------------
const D = require('Diagnostics');
const Scene = require('Scene');
const FT = require('FaceTracking');
const FGestures = require('FaceGestures');
const A = require('Animation');
const R = require('Reactive');
const Time = require('Time');
var objToAnimate = Scene.root.find("plane0");
omarojo / ContrastShader.fsh
Created Mar 27, 2018
Contrast Shader (GPUImage)
View ContrastShader.fsh
varying vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
uniform float contrast;
void main()
vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
gl_FragColor = vec4(((textureColor.rgb - vec3(0.5)) * contrast + vec3(0.5)), textureColor.w);
omarojo / blackandWhite.fsh
Created Mar 27, 2018
Black and White Shader (GPUImage)
View blackandWhite.fsh
precision highp float;
varying highp vec2 textureCoordinate;
uniform sampler2D inputImageTexture;
void main()
highp vec4 textureColor;
highp vec4 rCol;
highp vec4 gCol;
omarojo / UnityTriggerAnim.cs
Created Nov 10, 2017
Unity Trigger Animation Script
View UnityTriggerAnim.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
namespace Vuforia{
public class ImageTargetAnimTrigger: MonoBehaviour,
private TrackableBehaviour mTrackableBehaviour;
View RawDataOutput.swift
//self.inputVideoData is an instanace of RawDataOutput
if let rawData = self.inputVideoData {
rawData.dataAvailableCallbackWithSize = {[weak self] dataArray, frameSize in
let numberOfBytesPerRow = frameSize.width;
let data = Data.init(bytes: dataArray)
data.withUnsafeBytes { (u8Ptr: UnsafePointer<UInt8>) -> Void in
View StaticPixelBuffer.swift
import lf
import UIKit
import XCGLogger
import AVFoundation
let sampleRate:Double = 44_100
final class LiveViewController: UIViewController {
omarojo / G8LiveStreamer.swift
Last active May 4, 2017
LF Custom Live Content
View G8LiveStreamer.swift
import UIKit
import AVFoundation
import lf
import GPUImage
import VideoToolbox
class G8LiveStreamer: NSObject {
var streamUrl:String?
omarojo / Pause.swift
Created May 4, 2017
Pause Image for LF Streamer
View Pause.swift
var pausePixelBuffer = CVPixelBuffer?
func pauseTheStream(){
//Create your Pause Image
//Push your Pause Image into the stream
//Pause the stream, the video should stop in the last frame, which is your image
You can’t perform that action at this time.