示例#1
0
        public override bool SetTextureOnMaterial(ShaderProperty.TextureValue field, ImageMeta id, PlaytimePainter painter)
        {
            if (!field.IsGlobalVolume())
            {
                return(false);
            }

            var gl = VolumeTexture.GetGlobal(field);

            if (gl != null)
            {
                gl.ImageMeta = id;
                gl.UpdateMaterials();
            }

            return(true);
        }
示例#2
0
        public override bool GetTexture(ShaderProperty.TextureValue field, ref Texture tex, PlaytimePainter painter)
        {
            if (!field.IsGlobalVolume())
            {
                return(false);
            }

            var gl = VolumeTexture.GetGlobal(field);

            if (gl != null)
            {
                tex = gl.ImageMeta.CurrentTexture();
            }
            else
            {
                tex = null;
            }

            return(true);
        }
示例#3
0
 float BrushScaleMaxForCpu(VolumeTexture volTex) => volTex.size * volTex.Width * 0.025f;