In OpenGL, the support of vertex shader and fragment shader is needed for correct rendering. In vertex shader, each frame is for each object in the scene All vertices are processed once.
If y
In OpenGL, the support of vertex shader and fragment shader is needed for correct rendering. In vertex shader, each frame is for each object in the scene All vertices are processed once.
If y
As mentioned in the previous section, in Surface Shader, adding vertex functions, we can get vertex data in the vertex function, such as vertex color, vertex coordinates, etc.
This section le
1. Create a basic surface shader
Create a folder in Assets and name it Materials. Create a Shader in Materials. Create another Material. Both are named BasicDiffuse.
Open BasicDiffuse.s