protected virtual void AttachMaterial() { RemoveAndDispose(ref materialVariable); if (material != null && RenderCore is IMaterialRenderParams core) { materialVariable = core.MaterialVariables = Collect(EffectsManager.MaterialVariableManager.Register(material, EffectTechnique)); } }
protected override void OnDetach() { materialVariable = null; if (RenderCore is IMaterialRenderParams core) { core.MaterialVariables = null; } base.OnDetach(); }
protected virtual void AttachMaterial() { var newVar = material != null && RenderCore is VolumeRenderCore? EffectsManager.MaterialVariableManager.Register(material, EffectTechnique) : null; RemoveAndDispose(ref materialVariable); if (RenderCore is VolumeRenderCore core) { materialVariable = core.MaterialVariables = Collect(newVar); } }
/// <summary> /// /// </summary> protected virtual void AttachMaterial() { RemoveAndDispose(ref materialVariable); if (material != null && RenderCore is IMaterialRenderParams core) { core.MaterialVariables = materialVariable = Collect(EffectsManager.MaterialVariableManager.Register(material, EffectTechnique)); } if (Materials == null && Material is PhongMaterialCore p) { batchingBuffer.Materials = new PhongMaterialCore[] { p }; } }
protected virtual void AttachMaterial() { var newVar = material != null && RenderCore is IMaterialRenderParams? EffectsManager.MaterialVariableManager.Register(material, EffectTechnique) : null; RemoveAndDispose(ref materialVariable); materialVariable = Collect(newVar); if (RenderCore is IMaterialRenderParams core) { core.MaterialVariables = newVar; } }
protected override void OnDetach() { materialVariable = null; base.OnDetach(); }
public MaterialData(Material v) { materialVal = v; materialRef = null; }
public void SetValue(MaterialVariable value) { CurrentValue = value.CurrentValue; }