考虑可能有100多种效果,glsl对应不同条件生成可能超过100多个文件,所以建立一个单独文件夹管理所有glsl文件.
glslindex.txt 文件用来指示如何需要编译的glsl文件目录.
compileglsl.py 用来针对glslindex.txt编译glsl文件.
gl_NumWorkGroups/gridDim: 所有线程块的多少. gl_WorkGroupSize/blockDim: 本身线程块的大小. gl_WorkGroupID/blockIdx: 线程块在所有线程块中索引. gl_LocalInvocationID/threadIdx: 线程在线程块中的索引. gl_GlobalInvocationID = blockIdx*blockDim + gl_LocalInvocationID
Ray tracing with OpenGL Compute Shaders (Part I)
The Possibilities of Compute Shaders
VulkanSubgroups(vulkan subgroups example for reduce and scan) (#extension GL_KHR_shader_subgroup_arithmetic : enable)