mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-24 20:18:30 +00:00
REVIEWED: DrawMesh()
#2511
Disable color vertex attribute if not provided by mesh
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// Input vertex attributes (from vertex shader)
|
||||
in vec3 fragPosition;
|
||||
in vec2 fragTexCoord;
|
||||
in vec4 fragColor;
|
||||
//in vec4 fragColor;
|
||||
in vec3 fragNormal;
|
||||
|
||||
// Input uniform values
|
||||
|
@@ -4,7 +4,7 @@
|
||||
in vec3 vertexPosition;
|
||||
in vec2 vertexTexCoord;
|
||||
in vec3 vertexNormal;
|
||||
in vec4 vertexColor;
|
||||
//in vec4 vertexColor; // Not required
|
||||
|
||||
in mat4 instanceTransform;
|
||||
|
||||
@@ -28,7 +28,7 @@ void main()
|
||||
// Send vertex attributes to fragment shader
|
||||
fragPosition = vec3(mvpi*vec4(vertexPosition, 1.0));
|
||||
fragTexCoord = vertexTexCoord;
|
||||
fragColor = vertexColor;
|
||||
//fragColor = vertexColor;
|
||||
fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0)));
|
||||
|
||||
// Calculate final vertex position
|
||||
|
Reference in New Issue
Block a user