Affecting specific vertices in a vertex shader
by AcidFaucet · in Torque Game Engine Advanced · 08/25/2006 (6:15 pm) · 3 replies
I've written a simple random displacment shader. But it affects the entire material/model, which is not what I want (note: I knew this was what it would do, just wanted to be sure the displacement worked correctly).
I would like to only affect specific vertices of the model (such as the left arm for example).
I've been through the directx HLSL docs and completed the tutorials.
My thought was that I could pass specific vertices as a constant and then use them as reference values in the shader.
I can't help but feel like I'm missing something obvious.
Therefore I ask, is there a way to identify a specific vertex in a vertex shader?
An explicit answer or even a point to a page/document/tutorial would be fantastic.
I would like to only affect specific vertices of the model (such as the left arm for example).
I've been through the directx HLSL docs and completed the tutorials.
My thought was that I could pass specific vertices as a constant and then use them as reference values in the shader.
I can't help but feel like I'm missing something obvious.
Therefore I ask, is there a way to identify a specific vertex in a vertex shader?
An explicit answer or even a point to a page/document/tutorial would be fantastic.
About the author
Torque Owner AcidFaucet