Skip to content

Commit

Permalink
Better default values for normals and tangents (VBOs) (#4763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bigfoot71 authored Feb 14, 2025
1 parent ee946b2 commit c647d33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rmodels.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ void UploadMesh(Mesh *mesh, bool dynamic)
{
// Default vertex attribute: normal
// WARNING: Default value provided to shader if location available
float value[3] = { 1.0f, 1.0f, 1.0f };
float value[3] = { 0.0f, 0.0f, 1.0f };
rlSetVertexAttributeDefault(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL, value, SHADER_ATTRIB_VEC3, 3);
rlDisableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL);
}
Expand Down Expand Up @@ -1339,7 +1339,7 @@ void UploadMesh(Mesh *mesh, bool dynamic)
{
// Default vertex attribute: tangent
// WARNING: Default value provided to shader if location available
float value[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
float value[4] = { 1.0f, 0.0f, 0.0f, 1.0f };
rlSetVertexAttributeDefault(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT, value, SHADER_ATTRIB_VEC4, 4);
rlDisableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT);
}
Expand Down

0 comments on commit c647d33

Please sign in to comment.