Skip to content

Commit f064b35

Browse files
committed
Add clarifying comments
1 parent 7f40814 commit f064b35

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Source/Scene/processModelMaterialsCommon.js

+1
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ import ModelUtility from './ModelUtility.js';
543543
if (hasNormals) {
544544
fragmentShader += ' vec3 normal = normalize(v_normal);\n';
545545
if (khrMaterialsCommon.doubleSided) {
546+
// !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/AnalyticalGraphicsInc/cesium/pull/8494.
546547
fragmentShader += ' if (gl_FrontFacing == false)\n';
547548
fragmentShader += ' {\n';
548549
fragmentShader += ' normal = -normal;\n';

Source/Scene/processPbrMaterials.js

+1
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ import ModelUtility from './ModelUtility.js';
602602
fragmentShader += ' vec3 n = ng;\n';
603603
}
604604
if (material.doubleSided) {
605+
// !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/AnalyticalGraphicsInc/cesium/pull/8494.
605606
fragmentShader += ' if (gl_FrontFacing == false)\n';
606607
fragmentShader += ' {\n';
607608
fragmentShader += ' n = -n;\n';

0 commit comments

Comments
 (0)