private void InitLayers() { terrainField = new DoubleDataTexture("Terrain Height Field", TEX_SIZE, RenderTextureFormat.ARGBFloat, FilterMode.Point); regolithField = new DoubleDataTexture("Regolith Field", TEX_SIZE, RenderTextureFormat.RFloat, FilterMode.Point); regolithOutFlow = new DoubleDataTexture("Regolith outflow", TEX_SIZE, RenderTextureFormat.ARGBHalf, FilterMode.Point); slippageHeight = DoubleDataTexture.Create("Slippage Height", TEX_SIZE, RenderTextureFormat.RHalf, FilterMode.Point); // was RHalf slippageOutflow = DoubleDataTexture.Create("Slippage Outflow", TEX_SIZE, RenderTextureFormat.ARGBHalf, FilterMode.Point); // was ARGBHalf magmaVelocity = new DoubleDataTexture("Magma Velocity", TEX_SIZE, RenderTextureFormat.ARGBHalf, FilterMode.Bilinear); // was RGHalf }
static DoubleDataTexture() { tempRTARGB = DoubleDataTexture.Create("tempRTARGB", 1, RenderTextureFormat.ARGBFloat, FilterMode.Point); tempT2DRGBA = new Texture2D(1, 1, TextureFormat.RGBAFloat, false); tempT2DRGBA.wrapMode = TextureWrapMode.Clamp; tempT2DRGBA.filterMode = FilterMode.Point; tempRTRFloat = DoubleDataTexture.Create("tempRTRFloat", 1, RenderTextureFormat.RFloat, FilterMode.Point); tempT2DRFloat = new Texture2D(1, 1, TextureFormat.RFloat, false); tempT2DRFloat.wrapMode = TextureWrapMode.Clamp; tempT2DRFloat.filterMode = FilterMode.Point; LoadMaterials(); }
public LayerWithErosion(string name, int size, float viscosity, ErosionSim link) : base(name, size, viscosity, link) { //waterField = new DoubleDataTexture("Water Field", TEX_SIZE, RenderTextureFormat.RFloat, FilterMode.Point); //waterOutFlow = new DoubleDataTexture("Water outflow", TEX_SIZE, RenderTextureFormat.ARGBHalf, FilterMode.Point); sedimentField = new DoubleDataTexture("Sediment Field", size, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); // was RHalf sedimentField.ClearColor(); advectSediment = new DoubleDataTexture("Sediment Advection", size, RenderTextureFormat.RHalf, FilterMode.Bilinear); // was RHalf advectSediment.ClearColor(); sedimentDeposition = new DoubleDataTexture("Sediment Deposition", size, RenderTextureFormat.ARGBFloat, FilterMode.Point); // was RHalf sedimentDeposition.ClearColor(); tiltAngle = DoubleDataTexture.Create("Tilt Angle", size, RenderTextureFormat.RHalf, FilterMode.Point);// was RHalf //sedimentOutFlow = DoubleDataTexture.Create("sedimentOutFlow", size, RenderTextureFormat.ARGBHalf, FilterMode.Point);// was ARGBHalf //sedimentOutFlow.ClearColor(); }
static public RenderTexture Load(string path) { Texture2D tex = Texture2DExtensions.LoadPNG(path); if (tex == null) { Debug.Log("Can't load " + path + " texture"); return(null); } var changeFormatTexture = new Texture2D(tex.width, tex.width, TextureFormat.RGBAFloat, false); changeFormatTexture.SetPixels(tex.GetPixels()); changeFormatTexture.Apply(); var res = DoubleDataTexture.Create("Loaded", tex.width, RenderTextureFormat.ARGBFloat, FilterMode.Point);// was RHalf Graphics.CopyTexture(changeFormatTexture, 0, 0, res, 0, 0); GameObject.Destroy(tex); GameObject.Destroy(changeFormatTexture); return(res); }