0

I've read some papers and it says like they can detect silhouette,edge,ridge and draw a line to it using GLSL shader. But in the implementation they says that they 'accessed' neighbouring pixel and do something. How can that even possible?

This is the paper in question http://www.google.co.th/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CDEQFjAC&url=http%3A%2F%2Fcg.postech.ac.kr%2Fresearch%2Fline_drawings_via_abstracted_shading%2Fline-drawing-s07.pdf&ei=I5GeUO-pMcKzrAf8_4DICw&usg=AFQjCNE7D9nMVKWvYwvNUaHo5S1ZfrG10A&sig2=CmnD6hbD6-0EYkvv-Bj3LQ

It's on section 3, Rendering Lines. They initially said about GLSL shader but then they suddenly talk about sample the groups of pixel.

I'm studying about non-photorealistic rendering without image processing after I render it. So GPU usage can be optimum if it was done in GLSL shaders.

5argon
  • 3,683
  • 3
  • 31
  • 57

1 Answers1

2

Without reading the paper, I assume they probably mean gather reads from a texture, not scatter writes to the framebuffer, which has always been possible with shaders. Since OpenGL-4 it's even possible to do scatter writes from a shader, called image writing, but it's rather slow. Anyway, for line detection you only need gather reads, so this is not a problem.

datenwolf
  • 159,371
  • 13
  • 185
  • 298