#region File Description
//-----------------------------------------------------------------------------
// BloomSettings.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion
#region Using Statements
using System;
#endregion
namespace NetRumble
{
///
/// Class holds all the settings used to tweak the bloom effect.
///
///
/// This public class is similar to one in the Bloom sample.
///
public class BloomSettings
{
#region Fields
// Name of a preset bloom setting, for display to the user.
public readonly string Name;
// Controls how bright a pixel needs to be before it will bloom.
// Zero makes everything bloom equally, while higher values select
// only brighter colors. Somewhere between 0.25 and 0.5 is good.
public readonly float BloomThreshold;
// Controls how much blurring is applied to the bloom image.
// The typical range is from 1 up to 10 or so.
public readonly float BlurAmount;
// Controls the amount of the bloom and base images that
// will be mixed into the final scene. Range 0 to 1.
public readonly float BloomIntensity;
public readonly float BaseIntensity;
// Independently control the color saturation of the bloom and
// base images. Zero is totally desaturated, 1.0 leaves saturation
// unchanged, while higher values increase the saturation level.
public readonly float BloomSaturation;
public readonly float BaseSaturation;
#endregion
///
/// Constructs a new bloom settings descriptor.
///
public BloomSettings(string name, float bloomThreshold, float blurAmount,
float bloomIntensity, float baseIntensity,
float bloomSaturation, float baseSaturation)
{
Name = name;
BloomThreshold = bloomThreshold;
BlurAmount = blurAmount;
BloomIntensity = bloomIntensity;
BaseIntensity = baseIntensity;
BloomSaturation = bloomSaturation;
BaseSaturation = baseSaturation;
}
///
/// Table of preset bloom settings, used by the sample program.
///
public static BloomSettings[] PresetSettings =
{
// Name Thresh Blur Bloom Base BloomSat BaseSat
new BloomSettings("NetRumble", 0.25f, 4, 1.25f, 1, 1, 1),
new BloomSettings("VectorRumble", 0f, 2, 3f, 1, 2, 1),
};
}
}