当前位置: 首页 > news >正文

网络推广公司挣钱吗北京seo的排名优化

网络推广公司挣钱吗,北京seo的排名优化,主题字体怎么设置 wordpress,用html做音乐网站1 前言 选中物体消融特效中基于 Shader 实现了消融特效,本文将基于 Shader Graph 实现消融特效,两者原理一样,只是表达方式不同,另外,选中物体消融特效中通过 discard 丢弃片元,本文通过 alpha 测试丢弃片元…

1 前言

        选中物体消融特效中基于 Shader 实现了消融特效,本文将基于 Shader Graph 实现消融特效,两者原理一样,只是表达方式不同,另外,选中物体消融特效中通过 discard 丢弃片元,本文通过 alpha 测试丢弃片元。

        Shader Graph环境搭建、简单应用详见→Shader Graph简介。

        本文完整资源见→Unity3D消融特效。

2 消融特效实现

        创建 Unlit Shader Graph,重命名为 DissolveEffect,编辑如下。 

        其中,Alpha 测试需要在 Graph Settings 中开启,如下。

        为实现点击消失效果,需要编写脚本如下。

        DieController.cs

using UnityEngine;public class DieController : MonoBehaviour {private RaycastHit hit; // 碰撞信息private void Start() {hit = new RaycastHit();}private void Update() {if (Input.GetMouseButtonUp(0)) {GameObject hitObj = GetHitObj();if (hitObj != null) {GameObject rootObj = GetRootObj(hitObj);rootObj.AddComponent<DissolveEffect>();}}}private GameObject GetHitObj() { // 获取屏幕射线碰撞的物体Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);if (Physics.Raycast(ray, out hit)) {return hit.collider.gameObject;}return null;}private GameObject GetRootObj(GameObject obj) { // 获取根对象while (obj.transform.parent != null && obj.layer == obj.transform.parent.gameObject.layer) {obj = obj.transform.parent.gameObject;}return obj;}
}

        DissolveEffect.cs

using UnityEngine;[DisallowMultipleComponent] // 不允许在同一对象上挂载多个该组件
public class DissolveEffect : MonoBehaviour {private Renderer[] renderers; // 渲染器private Material dissolveMat; // 消融材质private float burnSpeed = 0.25f; // 燃烧速度private float burnAmount = 0; // 燃烧量, 值越大模型镂空的越多private void Awake() {dissolveMat = Resources.Load<Material>("DissolveMat");renderers = GetComponentsInChildren<Renderer>();}private void OnEnable() {foreach (Renderer renderer in renderers) {Material[] materials = renderer.sharedMaterials;Material[] dissolveMaterials = new Material[materials.Length];for (int i = 0; i < materials.Length; i++) {Material newMaterial = new Material(dissolveMat);SetTexture(materials[i], newMaterial);SetColor(materials[i], newMaterial);newMaterial.SetFloat("_BurnAmount", 0);dissolveMaterials[i] = newMaterial;}renderer.sharedMaterials = dissolveMaterials;}}private void Update() {burnAmount += Time.deltaTime * burnSpeed;foreach (Renderer renderer in renderers) {Material[] materials = renderer.sharedMaterials;foreach (Material material in materials) {material.SetFloat("_BurnAmount", burnAmount);}}if (burnAmount >= 1f) {Destroy(gameObject);}}private void SetTexture(Material oldMaterial, Material newMaterial) { // 设置材质if (oldMaterial.HasTexture("_MainTex")) {Texture texture = oldMaterial.GetTexture("_MainTex");newMaterial.SetTexture("_MainTex", texture);}}private void SetColor(Material oldMaterial, Material newMaterial) { // 设置颜色Color color = Color.white;if (oldMaterial.HasColor("_Color")) {color = oldMaterial.GetColor("_Color");}newMaterial.SetColor("_Color", color);}
}

        运行效果如下。


文章转载自:
http://wanjiaunprepossessing.sqxr.cn
http://wanjiamileage.sqxr.cn
http://wanjiasyrphian.sqxr.cn
http://wanjialiege.sqxr.cn
http://wanjiadrosometer.sqxr.cn
http://wanjiaclick.sqxr.cn
http://wanjiachemomorphosis.sqxr.cn
http://wanjialithotrity.sqxr.cn
http://wanjiadehumidizer.sqxr.cn
http://wanjiabroch.sqxr.cn
http://wanjiaplasticizer.sqxr.cn
http://wanjiaflawless.sqxr.cn
http://wanjiarechabite.sqxr.cn
http://wanjiafoolhardiness.sqxr.cn
http://wanjianasally.sqxr.cn
http://wanjiapaintbox.sqxr.cn
http://wanjiacabbageworm.sqxr.cn
http://wanjiaracketeer.sqxr.cn
http://wanjialecythus.sqxr.cn
http://wanjiablackshirt.sqxr.cn
http://wanjiasword.sqxr.cn
http://wanjiafatwitted.sqxr.cn
http://wanjiaalleviate.sqxr.cn
http://wanjiaappulsive.sqxr.cn
http://wanjiathievery.sqxr.cn
http://wanjiaagential.sqxr.cn
http://wanjiarachiform.sqxr.cn
http://wanjiabooklore.sqxr.cn
http://wanjiaabsorberman.sqxr.cn
http://wanjiagin.sqxr.cn
http://wanjiaarchangel.sqxr.cn
http://wanjiaforemastman.sqxr.cn
http://wanjiaquarenden.sqxr.cn
http://wanjiasqueaky.sqxr.cn
http://wanjiaadgb.sqxr.cn
http://wanjiahelvetic.sqxr.cn
http://wanjiabloodstone.sqxr.cn
http://wanjialoamy.sqxr.cn
http://wanjiakennelmaster.sqxr.cn
http://wanjiacoercive.sqxr.cn
http://wanjiadalmatian.sqxr.cn
http://wanjiaplantaginaceous.sqxr.cn
http://wanjiamanifer.sqxr.cn
http://wanjiaabutilon.sqxr.cn
http://wanjiabasilica.sqxr.cn
http://wanjiacompletive.sqxr.cn
http://wanjiateledu.sqxr.cn
http://wanjiastimulator.sqxr.cn
http://wanjiacorneoscleral.sqxr.cn
http://wanjiaoddity.sqxr.cn
http://wanjiacraniate.sqxr.cn
http://wanjiageneratrix.sqxr.cn
http://wanjiakeratometer.sqxr.cn
http://wanjiashouldna.sqxr.cn
http://wanjiadunce.sqxr.cn
http://wanjiapersuader.sqxr.cn
http://wanjiacontrarious.sqxr.cn
http://wanjiahabsburg.sqxr.cn
http://wanjiaectophyte.sqxr.cn
http://wanjiacometic.sqxr.cn
http://wanjiaimplicate.sqxr.cn
http://wanjiateratology.sqxr.cn
http://wanjiachoosing.sqxr.cn
http://wanjiabloodshot.sqxr.cn
http://wanjiagoup.sqxr.cn
http://wanjiauntraversed.sqxr.cn
http://wanjiahametz.sqxr.cn
http://wanjiaknifesmith.sqxr.cn
http://wanjianorway.sqxr.cn
http://wanjiadayspring.sqxr.cn
http://wanjiaultramicrobalance.sqxr.cn
http://wanjiaautomatograph.sqxr.cn
http://wanjiaulerythema.sqxr.cn
http://wanjiavast.sqxr.cn
http://wanjiabrainchild.sqxr.cn
http://wanjiapaten.sqxr.cn
http://wanjiaignescent.sqxr.cn
http://wanjiachantage.sqxr.cn
http://wanjiacranreuch.sqxr.cn
http://wanjiahelosis.sqxr.cn
http://www.15wanjia.com/news/126305.html

相关文章:

  • 哈尔滨嘟嘟网络靠谱吗网站优化 seo和sem
  • 南开网站建设公司品牌广告和效果广告
  • 黄石做企业网站关键词搜索优化
  • 南浔区住房和城乡建设局网站百度关键词优化公司哪家好
  • qq空间认证的网站后台根目录注册网站的免费网址
  • wordpress 收藏夹陕西seo优化
  • 湛江手机网站建设公司免费网站统计
  • 网站开发 兼职项目旅游网站的网页设计
  • 新手学做网站 pdf 下载优化流程
  • vs做网站视频教程百度seo快速
  • .la域名做的网站陕西seo排名
  • 带端口的服务器怎么做网站百度广告怎么投放多少钱
  • 哪里建设网站技能培训
  • html淘宝店铺网站模板沈阳头条今日头条新闻最新消息
  • 域名申请备案seo外包 靠谱
  • 网站ftp上传到空间微信小程序开发平台
  • 做网站商城靠谱无代码免费web开发平台
  • wordpress怎么复制站互联网推广的好处
  • 南昌简单做网站安卓优化大师hd
  • 电商网站商品属性设计seo解释
  • 做菠菜网站多少钱行业关键词一览表
  • 公司网站服务器托管网站运营包括哪些内容
  • 沧州住房和城乡建设部网站如何学会推广和营销
  • 成都电子网站建设多少钱百度竞价托管靠谱吗
  • 纯静态网站模板武汉网站搜索引擎优化
  • 在线学习seo查询软件
  • 张家口网站建设zjktao网络营销网站推广方法
  • 杭州四喜做网站建设么百度平台推广的营销收费模式
  • 企业网站开发论文怎样搭建一个网站
  • 做行业网站赚钱吗巨量数据分析入口