Information about neighbor vertices in HLSL



Hi! I don’t know much about writing shaders but somehow I am now able to write the simplest stuff in Render Monkey and I want to learn more.

My question is whether it’s possible to get information about neighbor vertices in the vertex shader. Say, I want to write a shader that smooths models by moving vertices closer to the average of the positions of their neighbors. Is this possible with a shader or am I supposed to make the CPU do this stuff somehow?

I searched in the HLSL reference but haven’t found much help. This may be due to my lack of knowledge in this area though. I don’t understand most of the stuff written there :slight_smile: I know a little C also, if it helps.

Thanks for reading :slight_smile:


No, not in the vertex shader.
You can though in the geometry processor.



Thanks a lot :slight_smile:


you shouldnt do any work on cpu if its already in gpu memory, if its in gpu memory then your supposed to use shaders to modify it, be it a game, graphics editor, or anything.