public LowEndMobilePipeline(LowEndMobilePipelineAsset asset) { m_Asset = asset; BuildShadowSettings(); m_ShadowMapProperty = Shader.PropertyToID("_ShadowMap"); m_ShadowMapRTID = new RenderTargetIdentifier(m_ShadowMapProperty); }
public override void OnInspectorGUI() { LowEndMobilePipelineAsset pipeAsset = target as LowEndMobilePipelineAsset; serializedObject.Update(); EditorGUILayout.Space(); EditorGUILayout.LabelField(Styles.renderingLabel, EditorStyles.boldLabel); EditorGUI.indentLevel++; EditorGUILayout.PropertyField(m_MaxPixelLights, Styles.maxPixelLights); EditorGUILayout.PropertyField(m_SupportsVertexLightProp, Styles.enableVertexLightLabel); EditorGUILayout.PropertyField(m_EnableLightmapsProp, Styles.enableLightmap); EditorGUILayout.PropertyField(m_EnableAmbientProbeProp, Styles.enableAmbientProbe); EditorGUI.indentLevel--; EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField(Styles.shadowLabel, EditorStyles.boldLabel); EditorGUI.indentLevel++; EditorGUILayout.PropertyField(m_ShadowTypeProp, Styles.shadowType); EditorGUILayout.PropertyField(m_ShadowAtlasResolutionProp, Styles.shadowAtlasResolution); EditorGUILayout.PropertyField(m_ShadowNearPlaneOffsetProp, Styles.shadowNearPlaneOffset); EditorGUILayout.PropertyField(m_ShadowBiasProperty, Styles.shadowBias); EditorGUILayout.PropertyField(m_ShadowDistanceProp, Styles.shadowDistante); EditorGUILayout.PropertyField(m_ShadowCascadesProp, Styles.shadowCascades); ShadowCascades cascades = (ShadowCascades)m_ShadowCascadesProp.intValue; if (cascades == ShadowCascades.FOUR_CASCADES) { EditorGUILayout.PropertyField(m_ShadowCascade4SplitProp, Styles.shadowCascadeSplit); } else if (cascades == ShadowCascades.TWO_CASCADES) { EditorGUILayout.PropertyField(m_ShadowCascade2SplitProp, Styles.shadowCascadeSplit); } EditorGUI.indentLevel--; serializedObject.ApplyModifiedProperties(); }