stride/samples/Particles/ParticlesSample/ParticlesSample.Game/Effects/ParticleCustomEffect.xkfx
2018-06-19 18:07:32 +09:00

32 lines
1.2 KiB
Text

// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
namespace Xenko.Rendering
{
partial effect ParticleCustomEffect
{
// Use the ParticleBaseKeys for constant attributes, defined in the game engine
using params ParticleBaseKeys;
// Use the ParticleCustomShaderKeys for constant attributes, defined in this project
using params ParticleCustomShaderKeys;
// Inherit from the ParticleBaseEffect.xkfx, defined in the game engine
mixin ParticleBaseEffect;
// Use the ParticleCustomShader.xksl, defined in this project
mixin ParticleCustomShader;
// If the user-defined effect for the baseColor is not null use it
if (ParticleCustomShaderKeys.BaseColor != null)
{
mixin compose baseColor = ParticleCustomShaderKeys.BaseColor;
}
// If the user-defined effect for the baseIntensity (alpha) is not null use it
if (ParticleCustomShaderKeys.BaseIntensity != null)
{
mixin compose baseIntensity = ParticleCustomShaderKeys.BaseIntensity;
}
};
}