카테고리 없음

opengl ver4.3 이후로 바뀐점

ksh950510 2023. 7. 18. 10:59
728x90

COMPUTE SHADERS (can change the parallelism pipeline)

 

conventional graphics pipeline : vertex -> tessellation -> geometry -> fragment

each pipeline works independently

and we cant set the input or output, they just change directly on the GPU memory (likewise void function)

* A tessellation or tiling is the covering of a surface

 

The Compute Shader can be thought of as a mass of small computers called work groups.

we can forming that like a 3d array. also they are indenpendently work

but we have invocation called multiple thread (It can communicate with each other.)

 

if we want to use this compute shader

we need to create the shader object and feeding it the source code (like any shader)

and create a program and attach the compute shader to the program

 

To actually run the compute shader, we need to do glUseProgram, glDispatchCompute

and glMemoryBarrier

 

Compute Shaders are not part of the normal pipeline, so other processes might not wait for them to be done before doing something.

but glMemoryBarrier can prevent this, also we can plugging a specific barrier for performance

 

출처 : https://www.youtube.com/watch?v=nF4X9BIUzx0 

 

To do: Tessellation shaders, Direct State Access