public ShaderSource GetShaderFloat4(List <IVoxelModifierEmissionOpacity> modifiers) { var mixin = new ShaderMixinSource(); mixin.Mixins.Add(writer); StorageMethod.Apply(mixin); foreach (var attr in modifiers) { ShaderSource applier = attr.GetApplier("Isotropic"); if (applier != null) { mixin.AddCompositionToArray("Modifiers", applier); } } return(mixin); }
virtual public ShaderSource GetVoxelizationShader(List <VoxelModifierEmissionOpacity> modifiers) { var mixin = new ShaderMixinSource(); mixin.Mixins.Add(Writer); StorageMethod.Apply(mixin); foreach (var modifier in modifiers) { if (!modifier.Enabled) { continue; } ShaderSource applier = modifier.GetApplier(ApplierKey); if (applier != null) { mixin.AddCompositionToArray("Modifiers", applier); } } return(mixin); }