Hi all.
I have followed the learningwebgl tutorials and have gone over them many times trying different things.
[ul]
[li]I have learnt about dot products (angle between 2 vectors)[/2dzmvpoo][/li][li]I have learnt about a vector being a direction and magnitude(length of a vector)[/2dzmvpoo][/li][li]I have learnt about what a normal is (perpendicular vector to a plane (and in this case, the center of 3 vertices? right?)[/2dzmvpoo][/li][li]I have learnt about multiplying colours together to get a mix of colours that represent shading.[/2dzmvpoo][/li][li]I have learnt that you can get the distance (magnitude) of a vector by doing what is pretty much pythagoras across x,y and z rather than just a² + b².[/*2dzmvpoo][/ul][/li]
I have come across a fundamental lack of understanding now and it’s time to clear it up so I can progress.
Here is a few questions to start this thread going:
[ol]
[li]A vertex shader does linear interpolation between 3 points to find out all the pixels/points within that plane. The fragment shader processes each of those points which allows us to apply colours to it?[/2dzmvpoo][/li][li]I noticed that in the shader files, there is void main() for each one. Can i then assume that these are completely different apart from whatever is declared within the vertex shader is eventually passed through into the fragment shader. [/2dzmvpoo][/li][li]From the vertex shader, you are given a triangulated plane (3 vertices) in which you can do some math to… within the shader… to identify which points in the fragment shader need to be multipled with a 50% opaque black in order to cast a sexy shadow?[/*2dzmvpoo][/ol][/li]
I really do appreciate any help given. Although not utterly stuck, I find clarification the key to confident progression.
Thanks in advance!