Class ShaderGeneratorContext
Base class for generating shader class source with associated parameters.
public class ShaderGeneratorContext : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
  - Inheritance
 - 
      objectShaderGeneratorContext
 
- Implements
 
- Derived
 
- Inherited Members
 
- Extension Methods
 
Constructors
ShaderGeneratorContext(GraphicsDevice)
public ShaderGeneratorContext(GraphicsDevice graphicsDevice = null)
  Parameters
graphicsDeviceGraphicsDevice
Properties
ColorSpace
public ColorSpace ColorSpace { get; set; }
  Property Value
Content
Gets or sets the asset manager.
public ContentManager Content { get; set; }
  Property Value
- ContentManager
 The asset manager.
CurrentOverrides
public MaterialOverrides CurrentOverrides { get; }
  Property Value
FindAsset
public ShaderGeneratorContext.FindAssetDelegate FindAsset { get; set; }
  Property Value
GetAssetFriendlyName
public ShaderGeneratorContext.GetAssetFriendlyNameDelegate GetAssetFriendlyName { get; set; }
  Property Value
IsNotPixelStage
public bool IsNotPixelStage { get; set; }
  Property Value
Log
public LoggerResult Log { get; set; }
  Property Value
OptimizeMaterials
Gets or sets a value indicating whether materials will be optimized (textures blended together, generate optimized shader permutations, etc...).
public bool OptimizeMaterials { get; set; }
  Property Value
- bool
 trueif [materials are optimized]; otherwise,false.
Parameters
public ParameterCollection Parameters { get; set; }
  Property Value
Methods
GenerateTextureFromColor(Color)
public Texture GenerateTextureFromColor(Color color)
  Parameters
colorColor
Returns
GetParameterKey(ParameterKey)
public ParameterKey GetParameterKey(ParameterKey key)
  Parameters
keyParameterKey
Returns
GetSamplerKey(SamplerStateDescription, GraphicsDevice)
public ObjectParameterKey<SamplerState> GetSamplerKey(SamplerStateDescription samplerStateDesc, GraphicsDevice graphicsDevice)
  Parameters
samplerStateDescSamplerStateDescriptiongraphicsDeviceGraphicsDevice
Returns
GetSamplerKey(ComputeColorParameterSampler)
public ObjectParameterKey<SamplerState> GetSamplerKey(ComputeColorParameterSampler sampler)
  Parameters
samplerComputeColorParameterSampler
Returns
GetTextureKey(Texture, ObjectParameterKey<Texture>, Color?)
public ObjectParameterKey<Texture> GetTextureKey(Texture texture, ObjectParameterKey<Texture> key, Color? defaultTextureValue = null)
  Parameters
textureTexturekeyObjectParameterKey<Texture>defaultTextureValueColor?
Returns
GetTextureKey(ComputeTextureBase, MaterialComputeColorKeys)
public ObjectParameterKey<Texture> GetTextureKey(ComputeTextureBase computeTexture, MaterialComputeColorKeys baseKeys)
  Parameters
computeTextureComputeTextureBasebaseKeysMaterialComputeColorKeys
Returns
PopOverrides()
public void PopOverrides()
  PushOverrides(MaterialOverrides)
public void PushOverrides(MaterialOverrides overrides)
  Parameters
overridesMaterialOverrides
ResetParameterKeys()
protected void ResetParameterKeys()