This next topic gets a bit complicated. We're going to write new vertex and fragment shaders that handle lighting and write a corresponding class extending
Material that makes use of them. Don't worry though, we've already done this once before. We're just going to actually explain it this time.
Let's dive right into it. Locate the
res/raw/ folder. Then, for each file, right-click on it, and go to New | File to create new files.
uniform mat4 u_Model; uniform mat4 u_MVP; uniform mat4 u_MVMatrix; uniform vec3 u_LightPos; attribute vec4 a_Position; attribute vec4 a_Color; attribute vec3 a_Normal; varying vec4 v_Color; const float ONE = 1.0; const float COEFF ...