shader programming question
from what i have read it looks like shader programming deals with light and reflection. can they also used for general rotation of meshes ? or do you still use the cpu for that
Pixel shaders can be used for lighting or reflection but to generalise they are used to output the colour of pixels on a render target.
Vertex shaders process individual vertices as input by you when you make a draw call with your graphics API of choice. The vertex shader is where you perform any transformations including rotation.
You can use the CPU to perform rotation on meshes but I would recommend against it as it would increase your bandwidth use and could end up being very slow with lots of meshes.
Vertex shaders process individual vertices as input by you when you make a draw call with your graphics API of choice. The vertex shader is where you perform any transformations including rotation.
You can use the CPU to perform rotation on meshes but I would recommend against it as it would increase your bandwidth use and could end up being very slow with lots of meshes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement