public override void ShaderPropertiesLightingGUI(Material material) { CloudLightMode light = (CloudLightMode)material.GetInt("_LightMode"); lightMode.floatValue = (float)(CloudLightMode)EditorGUILayout.EnumPopup("Lighting Mode", light); m_MaterialEditor.TexturePropertySingleLine(CustomContent.cloudAttenuationRamp, cloudAttenuationRamp); if (lightMode.floatValue == (float)CloudLightMode.FakeDirectional) { EditorGUILayout.LabelField(CustomContent.fakeLightHeader, EditorStyles.boldLabel); using (new IndentScope(1)) { fakeLightDirection.vectorValue = EditorGUILayout.Vector3Field(CustomContent.fakeLightDirection, fakeLightDirection.vectorValue); fakeLightColor.colorValue = EditorGUILayout.ColorField(CustomContent.fakeLightColor, fakeLightColor.colorValue); fakeLightIntensity.floatValue = EditorGUILayout.FloatField(CustomContent.fakeLightIntensity, fakeLightIntensity.floatValue); } } if (light == CloudLightMode.DynamicPerPixel || light == CloudLightMode.FakeDirectional) { m_MaterialEditor.TexturePropertySingleLine(Content.normalMap, normalMap, null); } else { EditorGUILayout.LabelField(Content.vertexNormals); } cloudBackScattering.floatValue = EditorGUILayout.Slider(CustomContent.cloudBackScattering, cloudBackScattering.floatValue, 0.0f, 1.0f); }
public override void SetLightingMaterialKeywords(Material material) { CloudLightMode lightMode = (CloudLightMode)material.GetInt("_LightMode"); ShurikenMaster.SetKeyword(material, "VFX_LIGHTING", lightMode == CloudLightMode.DynamicPerPixel); ShurikenMaster.SetKeyword(material, "VFX_LIGHTING_FAKEDIRECTIONAL", lightMode == CloudLightMode.FakeDirectional); ShurikenMaster.SetKeyword(material, "VFX_LIGHTING_RAYMARCH2D", lightMode == CloudLightMode.Raymarch2D); }