Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Let’s talk WebGL
Search
Tomek Kopczuk
March 05, 2018
Programming
1
26
Let’s talk WebGL
Introduction to game development and three.js with Tomek Kopczuk, SwingDev’s CTO
Tomek Kopczuk
March 05, 2018
Tweet
Share
Other Decks in Programming
See All in Programming
dchart: charts from deck markup
ajstarks
3
990
CSC307 Lecture 06
javiergs
PRO
0
680
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
250
SourceGeneratorのススメ
htkym
0
190
Fluid Templating in TYPO3 14
s2b
0
130
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
MUSUBIXとは
nahisaho
0
130
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
AI & Enginnering
codelynx
0
110
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
100
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
72
The Art of Programming - Codeland 2020
erikaheidi
57
14k
My Coaching Mixtape
mlcsv
0
46
A designer walks into a library…
pauljervisheath
210
24k
Building AI with AI
inesmontani
PRO
1
680
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
97
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Transcript
www.swing3d.io Let’s talk WebGL Introduction to game development and three.js
with Tomek Kopczuk, SwingDev’s CTO
Game Development is different • Render loop • Only 16ms
per frame • Soft Real Time System
16ms to rule them all • Actual drawing • Collisions
• Physics • Animations • AI • I/O
So - WebGL • OpenGL ES for <canvas> • Transcends
way beyond 3D!
Programmable Pipeline Vertex Buffer Objects Primitive Processing Vertex Shader Primitive
Assembly Rasterizer Fragment Shader Depth Stencil Color Buffer Blend Dither Frame Buffer API Triangles/Lines/Points Vertices How does stuff get drawn?
How does stuff get drawn? VBO Vertex Shader Rasterization Fragment
Shader
three.js - introduction • After today we’re going to be
able to do this
three.js - introduction • Scene • Camera • Renderer
three.js - cameras and projections • Orthographic • Perspective
Camera Demo
three.js - introduction • Geometry • Material • Object3D •
Light • Mesh
three.js - common geometries • BoxGeometry • CircleGeometry • ConeGeometry
• CylinderGeometry • PlaneGeometry • SphereGeometry
Demo 1 - bootstrap, skybox, ground
three.js - common materials • MeshBasicMaterial • MeshLambertMaterial • MeshPhongMaterial
• MeshPhysicalMaterial • MeshStandardMaterial • MeshToonMaterial • RawShaderMaterial
Demo 2 - cube and materials
three.js - shaders • Vertex shader • Fragment shader Vertex
Shader Uniforms Fragment Shader Frame Buffer Vertex Buffer Objects Varyings Attributes input input input output points to input
three.js - vertex shader uniform mat4 projectionMatrix; uniform mat4 modelViewMatrix;
void main () { gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }
three.js - fragment shader void main () { gl_FragColor =
vec4(0.5, 0.5, 0.5, 1.0); }
Demo 3 - cube with a shader
three.js - shaders - useful?
Demo 4 - cube with a dynamic shader
three.js - loading real assets • Group • OBJ Loader
• Texture Loader
Demo 5 - turret
three.js - loading real assets • Geometry • MeshStandardMaterial •
map • normalMap • aoMap • roughnessMap • metalnessMap • envMap • ModelView matrix
three.js - adding user interaction • Asynchronous to the render
loop • Raycasting
Demo 6 - moving turrets
Further reading • https://threejs.org/docs/index.html#manual/introduction/Creating- a-scene • https://threejs.org/examples/ • https://www.khronos.org/webgl/ •
https://www.opengl.org/sdk/tools/ShaderDesigner/
Thank you