Previous | Next --- Slide 24 of 82
Back to Lecture Thumbnails
arkhan

In this case, is every pixel covered by the same shader function, hence the goblin having the same texture as the floor? How would a programmer indicate multiple shaders which would apply to different vertexes/triangles?

kevtan

@arkhan I'm by no means a graphics expert, but it would seem reasonable that a shader is specific to a kind of material. From the programmer's point of view, it would seem like all you'd need to do is define different shaders for different materials. The GPU could then determine which shader to invoke based on what material is found at that location (see slide 17).

gpu

I found these class notes from CS 148 to be helpful understanding what a shader is/is doing. http://web.stanford.edu/class/cs148/pdf/class_08_shaders.pdf. Of course, we don't need this information for this class, but I think it helps to motivate this example usage of the GPU.

Please log in to leave a comment.