void Start() { _texPw = new Texture2D(n, n, TextureFormat.RGBA32, false, true); _texEtaX = new Texture2D(n, n, TextureFormat.RGBA32, false, true); _texEtaY = new Texture2D(n, n, TextureFormat.RGBA32, false, true); _cPw = _texPw.GetPixels(); _cEtaX = _texEtaX.GetPixels(); _cEtaY = _texEtaY.GetPixels(); displacementMat.SetFloat("_L", L); floatDecoderMat.SetFloat("_L", L); floatDecoderMat.SetTexture("_XTex", _texEtaX); floatDecoderMat.SetTexture("_YTex", _texEtaY); floatDecoderMat.SetTexture("_ZTex", _texPw); _texUvw = new RenderTexture(n, n, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); displacementMat.mainTexture = _texUvw; _k = new K(n, L); _phillips = new Phillips(_k, wind.magnitude, wind.normalized); _h0 = new H0(_phillips); _w = new W(_k); _h = new H(_h0, _w); _eta = new Eta(n, _k, _h); _fft = new FFT(n); _pw = new float[2 * n * n]; _etaX = new float[_pw.Length]; _etaY = new float[_pw.Length]; }
void Start() { _texPw = new Texture2D(n, n, TextureFormat.RGBA32, false, true); _texEtaX = new Texture2D(n, n, TextureFormat.RGBA32, false, true); _texEtaY = new Texture2D(n, n , TextureFormat.RGBA32, false, true); _cPw = _texPw.GetPixels(); _cEtaX = _texEtaX.GetPixels(); _cEtaY = _texEtaY.GetPixels(); displacementMat.SetFloat("_L", L); floatDecoderMat.SetFloat("_L", L); floatDecoderMat.SetTexture("_XTex", _texEtaX); floatDecoderMat.SetTexture("_YTex", _texEtaY); floatDecoderMat.SetTexture("_ZTex", _texPw); _texUvw = new RenderTexture(n, n, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); displacementMat.mainTexture = _texUvw; _k = new K(n, L); _phillips = new Phillips(_k, wind.magnitude, wind.normalized); _h0 = new H0(_phillips); _w = new W(_k); _h = new H(_h0, _w); _eta = new Eta(n, _k, _h); _fft = new FFT(n); _pw = new float[2 * n * n]; _etaX = new float[_pw.Length]; _etaY = new float[_pw.Length]; }
public H0(Phillips P) { this.P = P; init(); }