The Book of Shaders: uniforms
Bahasa Indonesia - Tiếng Việt - 日本語 - 中文版 - 한국어 - Español - Portugues - Français - Italiano - Deutsch - Русский - Polski - English So far we have seen how the GPU manages large numbers of parallel threads, each one responsible for assigning the color to a fraction of the total image. Although each parallel thread is blind to the others, we need to be able to send some inputs from the CPU to all the threads. Because of the architecture of the graphics card those inputs are going to be equal (uniform) to all the threads and necessarily set as read only. In other words, each thread receives the same data which it can read but cannot change. These inputs are called uniform and come in most of the supported types: float, vec2, vec3, vec4, mat2, mat3, mat4, sampler2D and samplerCube. Uniforms are defined with the corresponding type at the top of the shader right after assigning the default floating point precision. You can picture the uniforms like little bridges between the CPU and the GPU
The Book of Shaders: uniforms The Book of Shaders by Patricio Gonzalez Vivo & Jen Lowe Bahasa Indonesia - Tiếng Việt - 日本語 - 中文版 - 한국어 - Español - Portugues - Français - Italiano - Deutsch - Русский - Polski - English Uniforms So far we have seen how the GPU manages large numbers of parallel threads, each one responsible for assigning the color to a fraction of the total image. Although each parallel thread is blind to the others, we need to be able to send some inputs from the CPU to all the threads. Because of the architecture of the graphics card those inputs are going to be equal ( unifor
Explore this link on the map →related reading
- Teaching GPU programming in p5.js: now with compute shaders - Dave Pagurekdavepagurek.com
- CUDA C++ Programming Guide (Legacy) — CUDA C++ Programming Guidedocs.nvidia.com
- BrrrVizbrrrviz.com
- Execution Model - SLING user documentationdoc.sling.si
- The Case for Use.GPU — Acko.netacko.net
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- 1. Introduction — PTX ISA 9.3 documentationdocs.nvidia.com
- Gentle introduction to GPUs inner workings | vkSegfaultvksegfault.github.io
- LearnOpenGL - Hello Trianglelearnopengl.com
- General-purpose computing on graphics processing units - Wikipediaen.wikipedia.org
- The Book of Shaders: about this bookthebookofshaders.com
- CUDA - Wikipediaen.wikipedia.org