mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 10:49:18 -05:00
Review formating
This commit is contained in:
@ -25,17 +25,16 @@ const float normalOffset = 0.1;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
// calc binormal from vertex normal and tangent
|
||||
// Compute binormal from vertex normal and tangent
|
||||
vec3 vertexBinormal = cross(vertexNormal, vertexTangent);
|
||||
// calc fragment normal based on normal transformations
|
||||
|
||||
// Compute fragment normal based on normal transformations
|
||||
mat3 normalMatrix = transpose(inverse(mat3(matModel)));
|
||||
// calc fragment position based on model transformations
|
||||
|
||||
|
||||
// Compute fragment position based on model transformations
|
||||
fragPosition = vec3(matModel*vec4(vertexPosition, 1.0f));
|
||||
|
||||
fragTexCoord = vertexTexCoord*2.0;
|
||||
|
||||
fragNormal = normalize(normalMatrix*vertexNormal);
|
||||
vec3 fragTangent = normalize(normalMatrix*vertexTangent);
|
||||
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
|
||||
@ -45,5 +44,5 @@ void main()
|
||||
TBN = transpose(mat3(fragTangent, fragBinormal, fragNormal));
|
||||
|
||||
// Calculate final vertex position
|
||||
gl_Position = mvp * vec4(vertexPosition, 1.0);
|
||||
gl_Position = mvp*vec4(vertexPosition, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user