You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#ifndef direct
DirectLight directionalLight;
for ( int i = 0; i < SCENE_DIRECT_LIGHT_COUNT; i ++ ) {
// warning: use `continue` syntax may trigger flickering bug in safri 16.1.
if(!isRendererCulledByLight(renderer_Layer.xy, scene_DirectLightCullingMask[i])){
directionalLight.color = scene_DirectLightColor[i];
#ifdef SCENE_IS_CALCULATE_SHADOWS
if (i == 0) { // Sun light index is always 0
directionalLight.color *= shadowAttenuation;
}
#endif
directionalLight.direction = scene_DirectLightDirection[i];
addDirectionalDirectLightRadiance( directionalLight, surfaceData, color );
}
}
#endif
after compile
for (int i = 0; i < SCENE_DIRECT_LIGHT_COUNT; i++) {
0:1004 if (!isRendererCulledByLight(renderer_Layer.xy, scene_DirectLightCullingMask[i]))
0:1005 {
0:1006 directionalLight.color = scene_DirectLightColor[i];
0:1007 #ifdef SCENE_IS_CALCULATE_SHADOWS
0:1008
0:1009 if (i == 0)
0:1010 {
0:1011 directionalLight.color *= shadowAttenuation;
0:1012 }
0:1013
0:1014
0:1015 #endif
0:1016 directionalLight.direction = scene_DirectLightDirection[i];
0:1017 addDirectionalDirectLightRadiance(directionalLight, surfaceData, color);
0:1018 }
0:1019
0:1020
0:1021 }
0:1022 DirectLight directionalLight;
The text was updated successfully, but these errors were encountered:
original code:
after compile
The text was updated successfully, but these errors were encountered: