Ejemplo n.º 1
0
 public DynamicSmoothness(Water water, WindWaves windWaves)
 {
     this._Water          = water;
     this._WindWaves      = windWaves;
     this._Supported      = DynamicSmoothness.CheckSupport();
     this._VarianceShader = water.ShaderSet.GetComputeShader("Spectral Variances");
     this.OnCopyModeChanged();
 }
Ejemplo n.º 2
0
 private void ValidateVarianceTextures()
 {
     if (this._VarianceTexture == null)
     {
         this._VarianceTexture = DynamicSmoothness.CreateVarianceTexture(DynamicSmoothness._Format);
         this.ResetComputations();
     }
     if (!this._VarianceTexture.IsCreated())
     {
         this._VarianceTexture.Create();
         this._Water.Renderer.PropertyBlock.SetTexture("_SlopeVariance", this._VarianceTexture);
         this._LastResetIndex = 0;
         this._CurrentIndex   = 0;
     }
 }