Three.js - shaderMaterial and vertex/fragment shaders

A vertex shader: //WebGL Vertex Shader uniform mat4 uMVMatrix; // Model-view matrix uniform mat4 uPMatrix; // Projection matrix uniform mat4 uNMatrix; // Normal matrix attribute vec3 aVertexPosition; // Vertex position in object space attribute vec3 aVertexNormal; // Vertex normal in object space varying vec3 vPosition; // Vertex position (camera space) varying vec3 vNormal; // Vertex normal (camera space) void main(void) { vec4 camSpacePosition = uMVMatrix * vec4(aVertexPosition, 1....

June 13, 2018 · Kyle Fang

RWBY - Linear Level Design And Redundant Rank System

RWBY: Grimm Eclipse(RWBY) is a multiplayer online action game features the online anime RWBY. The game consists of different maps and combat setting. It has single-player or multiplayer mode. Both modes share the same level and combat system. There are four basic characters are available to control. Players need to defeat waves of enemies on a map to win. A scoreboard will be displayed to tell player’s performance when players finish a map, such as teamwork, attack, or assist....

June 4, 2018 · Kyle Fang

Final Fantasy XIV - Old Game Content Recycle and Encouragement

Final Fantasy XIV Final Fantasy XIV(FFXIV) is an MMORPG. Players explores the story and the world by controlling their character. The game is full of multi-player combat content, such as 4-men dungeon, 48-men PvP, and 144 men instance map. Except for combat, FFXIV also provides crafting and gathering abilities. This case study, however, only focus on combat game content. The Problem FFXIV is updated expansion. Each expansion will last around two years and consists of at least five patches updated periodically....

May 24, 2018 · Kyle Fang

Derivative

The First Derivative The first derivative is the slop of the tangent line to the function at point x. It tells if the function is increasing or decreasing. For example: $f(x) = 3x^3 - 6x^2 + 2x -1$ $\frac{df}{dx} = 9x^2 - 12x + 2$ $x=0$, $\frac{df}{dx}(0) = 2$, so the function is increasing at x = 0. $x = 1$, $\frac{df}{dx}(1) = 9 - 12 + 2 = -1$, so the function is decreasing at x = 1....

May 17, 2018 · Kyle Fang

Sphere Coordinates and Trigonometry

Sphere in 3-D three parameters: (r, θ, φ) $x = r \cdot sin(φ) cos(θ)$ $y = r \cdot sin(φ) sin(θ)$ $z = r \cdot cos(θ)$ Trigonometry $\cos(θ) = \frac{x}{\sqrt{x^{2} + y^{2}}}$ $\sin(θ) = \frac{y}{\sqrt{x^{2} + y^{2}}}$ $\tan(θ) = \frac{y}{x}$ arcsin/arccos/arctan is the inverse. e.g. $\tan(45^{\circ}) = 1$ $\arctan(1) = 45^{\circ}$

May 13, 2018 · Kyle Fang