Skip to content

Instantly share code, notes, and snippets.

Satoru NAKAJIMA Pentan

Block or report user

Report or block Pentan

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
@Pentan
Pentan / arraybench.swift
Created Sep 10, 2018
Swift Array with Dispatch concurrent performance somparison
View arraybench.swift
import Foundation
print("array bench")
print(" -o : output rendered image as \"result.ppm\"")
print(" -w Number : render image width")
print(" -h Number : render image height")
print(" -p Number : number of points")
print("----------")
var width = 4096
View nonono.glsl
precision mediump float;
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#define PI 3.141592653589793
//#define PI2 6.283185307179586
View blob.glsl
#define PI05 1.570796326795
#define PI 3.1415926535898
#define kNumVertX 15.0
#define kNumVertY 15.0
//#define kNumVertZ
#define kScale 0.2
#define kTranslate vec3(-1.5)
vec3 hash3(vec3 v) {
View plasmagica.osl
/*
Blender Advent Calendar 2015
http://www.adventar.org/calendars/833
day 16
http://c5h12.hatenablog.com/entry/2015/12/16/150540
by Pentan
Shader code is distributed under MIT license.
Plasmagica and It's logo are part of SHOW BY ROCK!! (c)SANRIO.
http://showbyrock.com/
*/
@Pentan
Pentan / feel_like_debris.glsl
Last active Dec 9, 2015
http://www.vertexshaderart.com/art/HW98dGDbChYw2FjpS に投稿したものに日本語でコメントをつけたもの
View feel_like_debris.glsl
#define PI05 1.570796326795
#define PI 3.1415926535898
// 適当なハッシュ関数.よくあるやつですが投稿したバージョンではカッコの位置を間違えているので注意
vec3 hash3(vec3 v) {
return fract(sin(v) * vec3(43758.5453123, 12345.6789012,76543.2109876));
}
// 回転関連
vec3 rotX(vec3 p, float rad) {
@Pentan
Pentan / gpuprng.glsl
Created Mar 1, 2015
The mysterious random number generator that was used in Toshiya Hachisuka's seminar at Tokyo Demo Fest 2015.
View gpuprng.glsl
/*
The mysterious random number generator that was used in Toshiya Hachisuka's seminar at Tokyo Demo Fest 2015.
He said that don't know detail of this algorithm.
http://www.ci.i.u-tokyo.ac.jp/~hachisuka/tdf2015.pdf
origin (404) http://gpgpu.org/forums/viewtopic.php?t=2591&sid=17051481b9f78fb49fba5b98a5e0f1f3
*/
#ifdef GL_ES
precision mediump float;
#endif
@Pentan
Pentan / nakawari.py
Last active Aug 29, 2015
Strange shapekey utility W.I.P.
View nakawari.py
bl_info = {
"name": "Nakawari Shapekey Utilities",
"author": "Pentan",
"version": (0, 1),
"blender": (2, 70, 0),
"location": "Object > Nakawari",
"description": "This addon makes Nakawari shapekeys for 2D hand drawn like motions.",
"warning": "experimental",
"wiki_url": "",
"category": "Animation"}
@Pentan
Pentan / keyconf_html.py
Last active Nov 24, 2018
Dump Blender key config as HTML.
View keyconf_html.py
import bpy
from bpy_extras import keyconfig_utils
import sys
# Dump Blender keyconfig as HTML.
# How to use
# 1. Open this file in Blender's Text Editor.
# 2. Do "Run Script".
# 3. New Text "keyconfigs.html" will be added.
# save it somewhere and open in web browser (recommends Safari, Chrome or Firefox).
@Pentan
Pentan / Armature2Mesh.py
Created Aug 24, 2012
Blender's script to create Envelope display type Armature like mesh.
View Armature2Mesh.py
import bpy
import math
import mathutils
from mathutils import Vector
from mathutils import Matrix
for selobj in bpy.context.selected_objects:
#print("{} is {}".format(selobj.name, selobj.type))
if selobj.type == 'ARMATURE':
arm = selobj.data
@Pentan
Pentan / ao_gcd.c
Created Aug 7, 2012
aobench (http://code.google.com/p/aobench/) with Grand Central Dispatch.
View ao_gcd.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <Block.h>
#include <dispatch/dispatch.h>
//
You can’t perform that action at this time.