Files
Hasebe/Assets/MK/MKToon/Editor/URP/Standard/StandardPBSEditor.cs
T
2026-10-09 17:25:14 +03:00

45 lines
1.5 KiB
C#
Executable File

//////////////////////////////////////////////////////
// MK Toon URP Standard PBS Editor //
// //
// Created by Michael Kremmel //
// www.michaelkremmel.de //
// Copyright © 2020 All rights reserved. //
//////////////////////////////////////////////////////
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;
using System;
using UnityEditor.Utils;
using UnityEditorInternal;
using EditorHelper = MK.Toon.Editor.EditorHelper;
namespace MK.Toon.Editor.URP
{
internal class StandardPBSEditor : MK.Toon.Editor.PhysicallyBasedEditorBase
{
public StandardPBSEditor() : base(RenderPipeline.Universal) {}
protected override void DrawEmissionFlags(MaterialEditor materialEditor)
{
}
protected override void EmissionRealtimeSetup(Material material)
{
if(Properties.emissionColor.GetValue(material).maxColorComponent <= 0)
material.globalIlluminationFlags |= MaterialGlobalIlluminationFlags.EmissiveIsBlack;
}
protected override void DrawPipeline(MaterialEditor materialEditor)
{
DrawPipelineHeader();
materialEditor.EnableInstancingField();
DrawRenderPriority(materialEditor);
DrawAddPrecomputedVelocity(materialEditor);
}
}
}
#endif