要在輸出前增加一行程式:

specular *= diffuse*(2.0 + shininess)/8.0;

// 加入這行
specular = ( specular < uDropoff ) ? 0.0 : 1.0;

gl_FragColor.rgb += uDirLightColor * uSpecularColor * uKs * specular;

譯註:反鋸齒技術參考資訊可以閱讀 AAA - Analytical Anti-Aliasing。