CppCon 2018: Valentin Galea “Rapid Prototyping of Graphics Shaders in Modern C++”
http://CppCon.org
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2018
—
Traditionally it's been hard or downright impossible to have C++ on a GPU: Graphics Shaders are mainly done in GLSL/HLSL (C-like languages) and Compute Shaders only recently run it via CUDA/LLVM complex toolchains. This is not always desirable or available - mobile phones for ex. Turns out code can compile both as valid C++ and shader language with a bit of library writing effort. All you mostly need is equivalent 2D/3D/4D vector and matrix types.
What's the catch then? Swizzling! The shader vector allows addressing of its components both as [0], [1], [2] etc but also as .x, .y, .xyz, .zyx, .xxx and all possible combinations. The talk details how this can be achieved in modern C++, clean and in a generic way, without preprocessor tricks, and overcome language obstacles like template argument deduction with implicit conversions. After all the effort it's possible to prototype complex procedural effects at an interactive rate with full CPU-side debugging. Of course, a dedicated GPU will very quickly outpace this but loses the debugging, and some devices might not always produce correct results due to driver bugs.
As takeaway and showcase of what can be achieved with the C++ techniques presented I'll introduce Signed Distance Field functions modeling and some shaders that use it: Procedural Generated Planet, Volumetric Clouds simulation and some fun experiments: a Vinyl Turntable and an Egg On Bicycle!
—
Valentin Galea, Splash Damage
Lead Core Tech Programmer
Valentin Galea is a professional video game developer based in London, UK. He currently works at Splash Damage for projects such as the award-winning "Gears of War" franchise on Windows 10 and Xbox One. C++ enthusiast and evangelist, focused on systems, graphics and engine programming. He has 10+ years worth of experience, with past work ranging from MMO projects to mobile and handheld games. When he's not geeking out on games, he collects vinyl records.
—
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
*-----*
The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/
*-----*
Видео CppCon 2018: Valentin Galea “Rapid Prototyping of Graphics Shaders in Modern C++” канала CppCon
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2018
—
Traditionally it's been hard or downright impossible to have C++ on a GPU: Graphics Shaders are mainly done in GLSL/HLSL (C-like languages) and Compute Shaders only recently run it via CUDA/LLVM complex toolchains. This is not always desirable or available - mobile phones for ex. Turns out code can compile both as valid C++ and shader language with a bit of library writing effort. All you mostly need is equivalent 2D/3D/4D vector and matrix types.
What's the catch then? Swizzling! The shader vector allows addressing of its components both as [0], [1], [2] etc but also as .x, .y, .xyz, .zyx, .xxx and all possible combinations. The talk details how this can be achieved in modern C++, clean and in a generic way, without preprocessor tricks, and overcome language obstacles like template argument deduction with implicit conversions. After all the effort it's possible to prototype complex procedural effects at an interactive rate with full CPU-side debugging. Of course, a dedicated GPU will very quickly outpace this but loses the debugging, and some devices might not always produce correct results due to driver bugs.
As takeaway and showcase of what can be achieved with the C++ techniques presented I'll introduce Signed Distance Field functions modeling and some shaders that use it: Procedural Generated Planet, Volumetric Clouds simulation and some fun experiments: a Vinyl Turntable and an Egg On Bicycle!
—
Valentin Galea, Splash Damage
Lead Core Tech Programmer
Valentin Galea is a professional video game developer based in London, UK. He currently works at Splash Damage for projects such as the award-winning "Gears of War" franchise on Windows 10 and Xbox One. C++ enthusiast and evangelist, focused on systems, graphics and engine programming. He has 10+ years worth of experience, with past work ranging from MMO projects to mobile and handheld games. When he's not geeking out on games, he collects vinyl records.
—
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
*-----*
The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/
*-----*
Видео CppCon 2018: Valentin Galea “Rapid Prototyping of Graphics Shaders in Modern C++” канала CppCon
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![CppCon 2018: Alan Talbot “Moving Faster: Everyday efficiency in modern C++”](https://i.ytimg.com/vi/EovBkh9wDnM/default.jpg)
![Coding Adventure: Compute Shaders](https://i.ytimg.com/vi/9RHGLZLUuwc/default.jpg)
![Writing shaders is fun!](https://i.ytimg.com/vi/Kz3Ma-e33Nc/default.jpg)
![CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”](https://i.ytimg.com/vi/NH1Tta7purM/default.jpg)
![Intro To Functions - 02 Vector, Swizzle and Boolean](https://i.ytimg.com/vi/loVq9t0qrMY/default.jpg)
![Should you learn Vulkan(C++)? Can beginners learn it?](https://i.ytimg.com/vi/5mq8y_z7BWQ/default.jpg)
![CppCon 2018: James McNellis “Unwinding the Stack: Exploring How C++ Exceptions Work on Windows”](https://i.ytimg.com/vi/COEv2kq_Ht8/default.jpg)
![Compile-Time Compression and Resource Generation with C++20 - Ashley Roll - CppCon 2021](https://i.ytimg.com/vi/KDO3hbMR1yc/default.jpg)
![Learn to Create Compute Shaders in Unity [PROMO]](https://i.ytimg.com/vi/GpLXXmpS6cQ/default.jpg)
![Run C++ Code in macOS Visual Studio Code! (2019)](https://i.ytimg.com/vi/zIIYN_PyUAM/default.jpg)
![CppCon 2017: Nicolas Guillemot “Design Patterns for Low-Level Real-Time Rendering”](https://i.ytimg.com/vi/mdPeXJ0eiGc/default.jpg)
![Mali-G78 & Mali-G68: Arm's New GPUs with Asynchronous Top Level](https://i.ytimg.com/vi/ckkTLVjU9vo/default.jpg)
![CppCon 2018: Mark Elendt “Patterns and Techniques Used in the Houdini 3D Graphics Application ”](https://i.ytimg.com/vi/2YXwg0n9e7E/default.jpg)
![Experienced C++ Developers Tell the Truth in 2021](https://i.ytimg.com/vi/hF0l2M-oD04/default.jpg)
![SIGGRAPH 2013 - Implicit Skinning: Real-Time Skin Deformation with Contact Modeling](https://i.ytimg.com/vi/RHySGIqEgyk/default.jpg)
![Why You Should Not Learn to Code (as an ex-Google programmer)](https://i.ytimg.com/vi/wwbM63-LFD4/default.jpg)
![](https://i.ytimg.com/vi/qWFnSAUYOo0/default.jpg)
![What is C++ - Chandler Carruth, Titus Winters - CppCon 2019](https://i.ytimg.com/vi/LJh5QCV4wDg/default.jpg)
![Top Programming Languages in 2020](https://i.ytimg.com/vi/bjFvcFjJpE0/default.jpg)
![GPU Accelerated Computing on Cross-Vendor Graphics Cards with Vulkan Kompute - Alejandro Saucedo](https://i.ytimg.com/vi/DBcXrJtJaIQ/default.jpg)