読者です 読者をやめる 読者になる 読者になる

Daily Creative Coding

元「30 min. Processing」。毎日、Creative Codingします。

レイマーチング

【GLSL】レイマーチングで複数の光源が作る影

See the Pen shadow by multiple lights by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolut…

【GLSL】レイマーチングでソフトシャドウ

See the Pen object with soft shadow by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolutio…

【GLSL】レイマーチングでハードシャドウ

See the Pen object with hard shadow by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolutio…

【GLSL】色付きのオブジェクト

See the Pen objects with color by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; st…

【GLSL】blobs

See the Pen blobs by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; struct Camera {…

レイマーチングでPhongの反射モデル

See the Pen raymarching with Phong reflection model by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform …

【GLSL】透視投影カメラと平行投影カメラ

See the Pen perspective camera and orthographic camera by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; unifo…

【GLSL】立方体とトーラスと球

See the Pen box + round box + sphere + torus by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_…

平行投影カメラと繰り返し

See the Pen repetition with orthographic camera by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2…

【GLSL】透視投影カメラと繰り返し

See the Pen repetition with perspective camera by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 #define HALF_PI PI / 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 …

【GLSL】カメラの上方向を回転させる

See the Pen rotation of the camera's top by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3…

【GLSL】カメラを回転させる

See the Pen camera rotation by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3 p, float the…

【GLSL】カメラを前後に動かす

See the Pen camera movement by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3 p, float the…

大域的・局所的に回転するボックス

See the Pen globally and locally rotating boxes by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotat…

【GLSL】回転する球

See the Pen globally rotating spheres by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3 p,…

【GLSL】マウスを追いかける球

See the Pen a sphere following mouse by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3 p, …

【GLSL】回転するボックス

See the Pen a rotating box by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; vec3 rotateX(vec3 p, float thet…

【GLSL】変形するボックス

See the Pen morphing box by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; float calcBoxDistance(vec3 p, vec…

【GLSL】球とRGBの光源

See the Pen sphere with rgb lights by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; float calcSphereDistanc…

【GLSL】球と一つの光源

See the Pen sphere with a moving light by aadebdeb (@aadebdeb) on CodePen. #define PI 3.14159265359 #define TWO_PI PI * 2.0 precision mediump float; uniform float u_time; uniform vec2 u_mouse; uniform vec2 u_resolution; float calcSphereDis…