作者:小HuLkfz_264 | 来源:互联网 | 2023-05-16 10:33
IhaveasimpleSceneKitscenewithonlytwolightsources(ambientandomni)andonemodel.Ihave
I have a simple SceneKit
scene with only two light sources (ambient and omni) and one model. I have noticed that my scene appears totally dark when running on iOS 10
(even before I recompiled my app with the iOS 10
SDK). After investigating I realized that my ambient light was the only one affecting my model.
我有一个简单的SceneKit场景,只有两个光源(环境和全向)和一个模型。我注意到在iOS 10上运行时我的场景显得很暗(甚至在我使用iOS 10 SDK重新编译我的应用程序之前)。经过调查,我意识到我的环境光是影响我模型的唯一一个。
The only way to make my omni light affect my model was to bring it really close to it, or to increase its intensity (using the new setIntensity:
selector) by a factor of 5000000
.
使我的全向光影响我的模型的唯一方法是使它非常接近它,或者将其强度(使用新的setIntensity:selector)增加5000000倍。
Changing the values of attenuationStartDistance
, attenuationEndDistance
, and attenuationFalloffExponent
didn't change the result, which is really odd, considering that if I use 0.0
for both distances then I shouldn't expect any attenuation, and yet it happened (hence the need to use this huge intensity value).
更改attenuationStartDistance,attenuationEndDistance和attenuationFalloffExponent的值并没有改变结果,这真的很奇怪,考虑到如果我对两个距离使用0.0,那么我不应该期望任何衰减,但它发生了(因此需要使用这个巨大的强度值)。
This result doesn't change even if I add the SCNDisableLinearSpaceRendering
key to my Info.plist
or the SCNDisableWideGamut
key.
即使我将SCNDisableLinearSpaceRendering键添加到我的Info.plist或SCNDisableWideGamut键,此结果也不会更改。
Am I missing some new parameter or is it an iOS 10
bug?
我错过了一些新参数还是iOS 10错误?
1 个解决方案