This file contains hidden or 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
#ifndef __simd_bilinear_sampler__ | |
#define __simd_bilinear_sampler__ | |
#include <immintrin.h> | |
class BilinearSampler { | |
protected: | |
const uint8_t* _pixels; | |
int _rowInBytes; |
This file contains hidden or 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
// | |
// GPUImageLittlePlanetProjectionFilter.h | |
// | |
// Created by Toshiyuki Suzumura on 2013/07/02. | |
// Copyright (c) 2013 Toshiyuki Suzumura. All rights reserved. | |
// | |
#import "GPUImageFilter.h" | |
@interface GPUImageLittlePlanetProjectionFilter : GPUImageFilter |
This file contains hidden or 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
uniform sampler2D tex; | |
float M_2PI = 6.283185307179586; | |
float SQRT2 = 1.4142135623730951; | |
void main() | |
{ | |
float x = (gl_TexCoord[0].x - 0.5); | |
float y = (gl_TexCoord[0].y - 0.5); | |
float r = sqrt(x*x+y*y); |
This file contains hidden or 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
#!/usr/local/bin/ruby | |
require 'aws-sdk' | |
require 'yaml' | |
# Get informations of the instance. | |
instance_id = `curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
endpoint = ['ec2', `curl -s http://169.254.169.254/latest/meta-data/public-hostname`.split('.')[1], 'amazonaws.com'].join('.') | |
ip = `curl -s http://169.254.169.254/latest/meta-data/public-ipv4` |
This file contains hidden or 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
require 'opengl' | |
$rot = 0.0 | |
def display | |
glEnable(GL_DEPTH_TEST) | |
glEnable(GL_LIGHTING) | |
glEnable(GL_LIGHT0) | |
glClearColor(0.0, 0.0, 1.0, 1.0) | |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) |
This file contains hidden or 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
#include <GL/glut.h> | |
void display(void) | |
{ | |
glEnable(GL_DEPTH_TEST); | |
glEnable(GL_LIGHTING); | |
glEnable(GL_LIGHT0); | |
glClearColor(0.0, 0.0, 1.0, 1.0); |
NewerOlder