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
High Performance WebGL
Search
Luigi De Rosa
February 21, 2018
Programming
1.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
High Performance WebGL
Slides from my talk about WebGL at FEVR meetup. 21 Feb 2018
Luigi De Rosa
February 21, 2018
Other Decks in Programming
See All in Programming
「人を評価する AI」の設計と実装
ryoyanara
0
230
MySQLとPostgreSQLって何が違うの?
akagami
0
130
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
460
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
540
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
370
Oxlintはいいぞ(続)
yug1224
1
410
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
190
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.1k
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.8k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
210
KATA
mclloyd
PRO
35
15k
Making Projects Easy
brettharned
120
6.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
360
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
Leo the Paperboy
mayatellez
8
2.2k
Skip the Path - Find Your Career Trail
mkilby
1
190
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Marketing to machines
jonoalderson
1
5.7k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.8k
Transcript
HIGH PERFORMANCE WEBGL what I learned doing WebGL… FEBRUARY 21TH,
2018
@luruke
EPIC is a digital agency made of passion and
creativity. We dedicate ourselves to crafting awesome and eye-catching digital experiences that change the way your brand connects with your clients.
None
None
HTTPS://GITHUB.COM/LURUKE/DEV-EXCUSES-CHROME
None
WE ARE EPIC 1
WE ARE EPIC 1
JUST A RASTERIZATION ENGINE! UEBBGL?
WEBGL IS NOT 3D
HTTPS://NICKDESAULNIERS.GITHUB.IO/RAWWEBGL/
HTTPS://WWW.KHRONOS.ORG/API/OPENGLES/2_X
HTTPS://SIMONSCHREIBT.DE/GAT/RENDERHELL/
• Three.js (react-vr, a-frame…) • Babylon.js • PixiJS (2d only…
for now) • Nanogl • Regl • … • Vanilla WebGL (if you are brave enough) Most used WebGL framework
WHAT I LEARNED After many headaches.
None
None
None
None
None
IN THE DETAIL…
DELIVERY DAY - Promotional game - Mobile first - Easy
to play - “on the go” - Support 2-3y old phones - Multiplatform (+60 device tested)
None
None
CONCEPT 1.0 Make sure you know what you are doing!
None
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
None
BLENDER - Great for prototyping - Open Source - Three.js
exporter - All-in-one solution (modelling + texturing + sculpturing…) 1.1 Is not just for 3D artist!
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
None
LOGIC + RENDER 1.2 Divide et impera
• Just logic! • Expose the “info” (score, parcels, …)
• Event based • Unit tested (well…partially) • Rendering independent (css, terminal, canvas, webgl….) Game engine
• Passive - read info from game engine • Handles
interaction (touch, click, gyroscope…) • Can just send events • Full WebGL (but we also won CSSDesignAward…) • Three.js + PixiJS Rendering
16.6MS
>
WEBGL AND HTML? 1.3 Sometimes are not good friends
None
WE ARE EPIC 1
None
CPU & GPU 1.4 Less they talk each other, the
better
HTTPS://SIMONSCHREIBT.DE/GAT/RENDERHELL/
None
WE ARE EPIC 1
WE ARE EPIC 1
TEXTURES = DATA 1.5 Textures are more than an image
None
HTTPS://WWW.PATREON.COM/MINIONSART
HTTPS://WWW.PATREON.COM/MINIONSART
HTTPS://WWW.PATREON.COM/MINIONSART
HTTPS://WWW.PATREON.COM/MINIONSART
HTTPS://WWW.PATREON.COM/MINIONSART
WE ARE EPIC 1 HTTPS://GITHUB.COM/SPITE/THREE.FBOHELPER
WE ARE EPIC 1
WE ARE EPIC 1
None
None
1.6 “With Great Power Comes Great Responsibility” FORCE GPU UPLOAD
HTTP://GLUMPY.READTHEDOCS.IO/
WE ARE EPIC 1
None
None
None
OBJECT POOLING 1.7
None
None
None
MULTIPLATFORM WEBGL 1.8 Make WebGL run (almost) everywhere
None
None
None
None
None
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
I NEED MORE POWER! 1.9 Do you?
None
None
None
DEBUGGING IS HARD 2.0 But not impossible
None
None
None
WE ARE EPIC 1
None
None
HOW TO START? 2.1 The hard way
• How Computer Graphic works • How 3D works (math,
vectors, light, matrix…) • How WebGL/OpenGL works • Write tons of Shaders • Success Learn WebGL like a BOSS:
WE ARE EPIC 1
WE ARE EPIC 1
WE ARE EPIC 1
Thank you! YOU GOT QUESTIONS? @luruke
Thank you! YOU GOT QUESTIONS? @luruke HTTP://SOLVERSGB.UPS.COM/DELIVERY-DAY/