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); }
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); }
float BrushScaleMaxForCpu(VolumeTexture volTex) => volTex.size * volTex.Width * 0.025f;