Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenpaiSharma committed Sep 1, 2022
1 parent 2e1147d commit b1baa59
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/webgl/shaders/phong.frag
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ void main(void) {
totalLight(vViewPosition, normalize(vNormal), diffuse, specular);

// Calculating final color as result of all lights (plus emissive term).
// Transparency is determined exclusively by the diffuse component.

gl_FragColor = isTexture ? texture2D(uSampler, vTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;
gl_FragColor.rgb = diffuse * gl_FragColor.rgb +
vAmbientColor * uAmbientMatColor.rgb +
specular * uSpecularMatColor.rgb +
uEmissiveMatColor.rgb;
vAmbientColor * uAmbientMatColor.rgb +
specular * uSpecularMatColor.rgb +
uEmissiveMatColor.rgb;
}

0 comments on commit b1baa59

Please sign in to comment.