コード例 #1
0
ファイル: HDIESImporter.cs プロジェクト: 13025491238/Graphics
        internal void SetupRenderPipelinePrefabLight(IESEngine engine, Light light, Texture ies)
        {
            HDLightTypeAndShape hdLightTypeAndShape = (light.type == LightType.Point) ? HDLightTypeAndShape.Point : HDLightTypeAndShape.ConeSpot;

            HDAdditionalLightData hdLight = GameObjectExtension.AddHDLight(light.gameObject, hdLightTypeAndShape);

            if (commonIESImporter.iesMetaData.UseIESMaximumIntensity)
            {
                LightUnit lightUnit = (commonIESImporter.iesMetaData.IESMaximumIntensityUnit == "Lumens") ? LightUnit.Lumen : LightUnit.Candela;
                hdLight.SetIntensity(commonIESImporter.iesMetaData.IESMaximumIntensity, lightUnit);
                if (light.type == LightType.Point)
                {
                    hdLight.IESPoint = ies;
                }
                else
                {
                    hdLight.IESSpot = ies;
                }
            }
        }