I’m wondering about ‘basic’ OpenGL graphics using CUDA.
With GLSL I can write a vertex shader and a fragment shader.
In the vertex shader, GLSL providers me with data associated with each vertex (e.g. position and normal). This step can be easily done in CUDA.
Then, data from the vertex shader is passed to the fragment shader. This data can be interpolated data! This means that GLSL can use barycentric coordinates to pass interpolated vertex data (e.g. UVs) from the vertex shader to the fragment shader. Does CUDA have a similar thing?
More specifically, GPU memory (buffers) can be shared between OpenGL and CUDA. Then, one can execute a CUDA kernel and process this buffer. But can it get the vertex interpolated data information?
On the subject, are there any features in GLSL that I can’t implement using CUDA, and in general, how do the two compare? (For example, can CUDA make GLSL redundant?)