Shaders Flashcards

1
Q

What does a Vertex Shader do?

A

A Vertex Shader

is run on every vertex

processes the vertex

and determines where the vertex should be on the screen

This information is eventually passed on to the Fragment Shader for this vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a Fragment Shader do?

A

It must decide how to colour an object that has vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are Uniforms?

A

These are variables sent to the Vertex and Fragment Shaders

They stay constant throughout the frame, though can be changed during the frame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are Attributes?

A

Values applied to individual vertices

Only available to Vertex Shader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Varyings?

A

Variables that are declared in the Vertex Shader and are shared with the Fragment Shader.

This is a simple way of passing data between the shaders

How well did you know this?
1
Not at all
2
3
4
5
Perfectly