Merge pull request #201 from dwango/santarh/fix_blendshape_editor_preview_light

Normalize blendshape preview light's intensity.
This commit is contained in:
ousttrue 2019-02-28 03:24:42 +09:00 committed by GitHub
commit 232c454604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,11 +55,20 @@ namespace VRM
{
m_previewUtility = new PreviewRenderUtility();
PreviewLights[0].intensity = 1.4f;
PreviewLights[0].transform.rotation = Quaternion.Euler(40f, 190f, 0);
PreviewLights[1].intensity = 1.4f;
foreach (var light in PreviewLights)
{
if (light == null) continue;
light.intensity = 0f;
}
SetAmbientColor(new Color(.1f, .1f, .1f, 0));
if (PreviewLights.Length > 0 && PreviewLights[0] != null)
{
PreviewLights[0].intensity = 1f;
PreviewLights[0].transform.rotation = Quaternion.Euler(20f, 200f, 0);
PreviewLights[0].color = new Color(1f, 1f, 1f, 1f);
}
SetAmbientColor(new Color(0.1f, 0.1f, 0.1f, 1f));
}
class FogScope : IDisposable