mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Exclude code that uses gl_PrimitiveID from shader when GLSL version < 150.
This commit is contained in:
parent
1e1ae95c60
commit
dffaf2f6c3
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue