This video covers the basics of GLSL array syntax and usage, and shows how to upload array data to your WebGL programs using regular uniforms. It also covers the several harsh limitations you have to live with when using arrays.
Code for this video is available in the series' GitHub page:
github.com/scr...
Referenced videos:
Pointlight + spotlight tutorial: • WebGL 2: Point lights ...
Uniforms: • WebGL 2: Uniforms (Par...
UBO and std140: • WebGL 2: Uniform Buffe...
You can find supplementary materials on this video series' GitHub page:
github.com/scr...
This series on WebGL 2 was produced for anyone who, like me, had major problems getting a firm understanding of WebGL's intermediate and advanced concepts. Every video is focused on a single concept. If I've done this well, you shouldn't really need to "get up to speed" before watching any of these videos. There are no external libraries. I'm not building up to a custom API or injecting any abstractions. And I don't expect you to have watched from episode #1 to get "how I'm doing things with WebGL."
Complete playlist:
• WebGL 2.0
Videos:
1. Creating WebGL Programs ( • WebGL 2: Programs (Hel... )
2. Quickie: Precision ( • WebGL 2 Quickie: Preci... )
3. Uniforms (Part 1) ( • WebGL 2: Uniforms (Par... )
4. Attributes Part 1: Basics ( • WebGL 2: Attributes (P... )
5. Attributes Part 2: Beyond Basics ( • WebGL 2: Attributes (P... )
6. Attributes Part 3: Element Arrays ( • WebGL 2: Element Array... )
7. Objects, Targets & Binding ( • WebGL 2: Objects, Targ... )
8. Textures Part 1: Basics ( • WebGL 2: Textures (Par... )
9. Textures Part 2: Mipmaps ( • WebGL 2: Mipmaps (Text... )
10. Textures Part 3: Texture Atlases ( • WebGL 2: Vertex Array ... )
11. Textures Part 4: Texture Arrays ( • WebGL 2: Texture Array... )
12. Vertex Array Objects ( • WebGL 2: Texture Atlas... )
13. Instanced Drawing ( • WebGL 2: Instanced Dra... )
14. Matrix Attributes ( • WebGL 2: Matrix Attrib... )
15. Transparency ( • WegGL 2: Transparency ... )
16. Camera Part 1 ( • WebGL 2: Cameras & Per... )
17. Camera Part 2: Clipping & Z-fighting ( • WebGL 2: Visualizing P... )
18. Lighting Part 1: Directional diffuse lighting ( • WebGL 2: Directional d... )
19. Lighting Part 2: Point lights & Spotlights ( • WebGL 2: Point lights ... )
20. Binary model files ( • WebGL 2: Creating bina... )
21. Uniform Buffer Objects (Uniforms Part 2) ( • WebGL 2: Uniform Buffe... )
22. Arrays Part 1: Uniforms ( • WebGL 2: Arrays & Unif... )
23. Arrays Part 2: UBOs and Hardware Bugs ( • WebGL 2: Hardware Bugs... )
24. Transform Feedback ( • WebGL 2: Transform Fee... )
25. Framebuffer Objects Part 1: The Basics ( • WebGL 2: Framebuffer O... )
26. Framebuffer Objects Part 2: The Gnarly Details ( • WebGL 2: Framebuffer O... )
About my setup: Please don't get distracted by any of it. I'm writing to TypeScript files, but you'll probably just use JavaScript files. I'm using VSCode with the GLSL Lint extension, but you should use whatever you are most comfortable using. I'm using Parcel.js for hot-reloading and ts transpilation, but you can use whatever system you like (even if that's just writing to a file on your desktop and hitting Ctrl+R.) Please please please: If you spend more than a minute setting your environment up, that's a minute wasted that you could be learning WebGL.
I really hope someone out there will find this series helpful.
Негізгі бет WebGL 2: Arrays & Uniforms
Пікірлер: 6