mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:39:03 +08:00
Merge pull request #6308 from smartavionics/mb-fix-legacy-glsl-issue
Remove gl_PrimitiveID from shader when it's not available.
This commit is contained in:
commit
c6f5f4fb33
@ -60,7 +60,11 @@ fragment =
|
||||
highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0);
|
||||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||
|
||||
#if __VERSION__ >= 150
|
||||
finalColor = (u_faceId != gl_PrimitiveID) ? ((-normal.y > u_overhangAngle) ? u_overhangColor : finalColor) : u_faceColor;
|
||||
#else
|
||||
finalColor = (-normal.y > u_overhangAngle) ? u_overhangColor : finalColor;
|
||||
#endif
|
||||
|
||||
gl_FragColor = finalColor;
|
||||
gl_FragColor.a = 1.0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user