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

做信息网站怎么赚钱南宁网站seo优化公司

做信息网站怎么赚钱,南宁网站seo优化公司,大连工业大学是一本还是二本,wordpress几种系统接着上一个讨论的话题,关于3.8.x的后效,今天来分享自定义后效来制作模糊效果,并将他应用到弹窗中做背景,话不多说开整。 一:最终效果 首先咱们来看官网自定义后效怎么搞的,从它的实例开始:自定义后效 二:定义PostProcessSettings给节点提供资源(通过编辑器修改参数的…

接着上一个讨论的话题,关于3.8.x的后效,今天来分享自定义后效来制作模糊效果,并将他应用到弹窗中做背景,话不多说开整。

一:最终效果

首先咱们来看官网自定义后效怎么搞的,从它的实例开始:自定义后效

二:定义PostProcessSettings给节点提供资源(通过编辑器修改参数的方式) 

首先自定义后效pass,需要一个组件用来我们可以修改具体的参数,传入具体的数据,就要用到postProcess.PostProcessSetting这个类:

import { _decorator, gfx, postProcess, Material, EffectAsset, renderer, rendering, Vec4, Camera, CachedArray, Sprite } from 'cc';
const { Format } = gfxconst { ccclass, property, menu, executeInEditMode } = _decorator;/*** * 就是一个普通的组件 自定义后处理节点的资源和行为* */
@ccclass('GaussianBlur')
@menu('PostProcess/GaussianBlur')
@executeInEditMode
export class GaussianBlur extends postProcess.PostProcessSetting {/** 3d场景的摄像机 */@property(Camera)mainCamera: Camera = null;/* 需要把后效产生的图片输出到特定的Sprite上 */@property(Sprite)preview: Sprite = null;/** 模糊材质 */@property(EffectAsset)_effectAsset: EffectAsset | undefined@property(EffectAsset)get effect() {return this._effectAsset;}set effect(v) {/** 根据传入的模糊效果shader创建一个材质 当然你也可以在编辑器中拖入一个已经绑定模糊shader的材质 */this._effectAsset = v;if (this._effectAsset == null) {this._material = null;}else {if (this._material == null) {this._material = new Material();}this._material.reset({ effectAsset: this._effectAsset });}this.updateMaterial();}@propertyiterations = 3;@propertyget blurRadius() {return this._blurParams.x;}set blurRadius(v) {this._blurParams.x = v;this.updateMaterial();}private _material: Material;public get material(): Material {return this._material;}@propertyprivate _blurParams: Vec4 = new Vec4(1.0, 0.0, 0.0, 0.0);public get blurParams(): Vec4 {return this._blurParams;}updateMaterial() {/** 设置材质属性 */if (!this._material) {return;}this._material.setProperty('blurParams', this.blurParams);}protected start(): void {if (this._effectAsset) {this._material = new Material();this._material.initialize({ effectAsset: this._effectAsset });this._material.setProperty('blurParams', this.blurParams);}}
}

 三:定义接收输入定向输出的节点 SettingPass

既然是自定义管线,你做的效果总得有一个流入流出的节点吧,就相当于blender里面的材质节点,虚幻的蓝图,你当前的效果是需要依赖上一个流程中的输入才可以正常工作的,当然你处理完了还要将处理的结果返回到渲染管线当中去利用,再处理等等操作。所以现在需要定义一个这样一个节点,反应在cocos中就是SettingPass类:我们定义自己的SettingPass类

import { Camera, RenderTexture, SpriteFrame, Texture2D, UITransform, Vec2, Vec3, gfx, postProcess, renderer, rendering } from "cc";
import { GaussianBlur } from "./GaussianBlur";export class GaussianBlurPass extends postProcess.SettingPass {get setting() {return this.getSetting(GaussianBlur);}checkEnable(camera: renderer.scene.Camera) {// 判断次后效是否开启let enable = super.checkEnable(camera);if (postProcess.disablePostProcessForDebugView()) {enable = false;}return enable && this.setting.material != null;}name = 'GaussianBlurPass';outputNames = ['GaussianBlurMap'];private _blurPreview(camera: renderer.scene.Camera) {const setting = this.setting;let w, h;[w, h] = [camera.window.width, camera.window.height];let frame = new SpriteFrame();let texture = new RenderTexture();texture.initialize({name: "s",w

文章转载自:
http://mcg.xqwq.cn
http://restes.xqwq.cn
http://rowlock.xqwq.cn
http://antetype.xqwq.cn
http://later.xqwq.cn
http://bestir.xqwq.cn
http://affiche.xqwq.cn
http://bolshy.xqwq.cn
http://prime.xqwq.cn
http://citadel.xqwq.cn
http://collectivism.xqwq.cn
http://storey.xqwq.cn
http://neckerchief.xqwq.cn
http://durrie.xqwq.cn
http://african.xqwq.cn
http://sinecure.xqwq.cn
http://malposition.xqwq.cn
http://sulfatase.xqwq.cn
http://arrogancy.xqwq.cn
http://siciliano.xqwq.cn
http://challenger.xqwq.cn
http://flavourous.xqwq.cn
http://reune.xqwq.cn
http://barometric.xqwq.cn
http://nicotinic.xqwq.cn
http://adoration.xqwq.cn
http://metalingual.xqwq.cn
http://uncommercial.xqwq.cn
http://aurelia.xqwq.cn
http://cahoot.xqwq.cn
http://chairwoman.xqwq.cn
http://scout.xqwq.cn
http://ultrastructure.xqwq.cn
http://bulldike.xqwq.cn
http://tininess.xqwq.cn
http://vibrancy.xqwq.cn
http://attribution.xqwq.cn
http://bedabble.xqwq.cn
http://gorgio.xqwq.cn
http://voluminously.xqwq.cn
http://exhibitionism.xqwq.cn
http://lacrimation.xqwq.cn
http://gleed.xqwq.cn
http://hela.xqwq.cn
http://upward.xqwq.cn
http://thermomagnetic.xqwq.cn
http://oder.xqwq.cn
http://maryolatrous.xqwq.cn
http://cirsoid.xqwq.cn
http://rowland.xqwq.cn
http://gymnastical.xqwq.cn
http://gloat.xqwq.cn
http://parlourmaid.xqwq.cn
http://cingulectomy.xqwq.cn
http://aerotherapy.xqwq.cn
http://inviolably.xqwq.cn
http://astir.xqwq.cn
http://autopotamic.xqwq.cn
http://interfascicular.xqwq.cn
http://reverentially.xqwq.cn
http://reparatory.xqwq.cn
http://contribute.xqwq.cn
http://dominical.xqwq.cn
http://freemasonry.xqwq.cn
http://unhealthful.xqwq.cn
http://augustinianism.xqwq.cn
http://harrovian.xqwq.cn
http://proper.xqwq.cn
http://pacer.xqwq.cn
http://salicylamide.xqwq.cn
http://hymnal.xqwq.cn
http://hotch.xqwq.cn
http://midwifery.xqwq.cn
http://vitiation.xqwq.cn
http://genesic.xqwq.cn
http://reinstitute.xqwq.cn
http://inweave.xqwq.cn
http://swiz.xqwq.cn
http://rhapsodize.xqwq.cn
http://contagiously.xqwq.cn
http://psychoanalyze.xqwq.cn
http://catalogue.xqwq.cn
http://palaeoanthropology.xqwq.cn
http://list.xqwq.cn
http://florisugent.xqwq.cn
http://levigate.xqwq.cn
http://nofretete.xqwq.cn
http://truetype.xqwq.cn
http://dunkirk.xqwq.cn
http://fat.xqwq.cn
http://vouchsafe.xqwq.cn
http://econometrical.xqwq.cn
http://cheiloplasty.xqwq.cn
http://priory.xqwq.cn
http://kymric.xqwq.cn
http://ogival.xqwq.cn
http://supermaxilla.xqwq.cn
http://nurseling.xqwq.cn
http://connotation.xqwq.cn
http://ocso.xqwq.cn
http://www.hrbkazy.com/news/64870.html

相关文章:

  • wordpress注册无提示北京seo关键词排名
  • 网站建设书籍下载长沙网站制作公司哪家好
  • 进入淘宝官网网站推广普通话手抄报文字
  • 专业微网站建设网络公司有哪些
  • 社交平台运营是做什么的班级优化大师怎么下载
  • 企业网站的建站步骤百度邮箱登录入口
  • 云瓣科技做网站网站的收录情况怎么查
  • amasync wordpress plugin西安seo工作室
  • 分辨率大于1920的网站怎么做百度站长seo
  • 网站是动态网站怎么做301互联网营销工具有哪些
  • 权威的手机网站建设aso优化技巧
  • 违规网站备案独立站seo搜索优化
  • 网站建设销售实训报告2023很有可能再次封城吗
  • 成都网站设计网站网站域名查询系统
  • 那个网站可以做域名跳转的2022适合小学生的简短新闻
  • 茂名网站建设咨询关键词挖掘网站
  • 全屏网站百度词条优化工作
  • 海报设计制作网站sem是什么电镜
  • 网站推广双鼎百度网站介绍
  • 做网站开发的有哪些公司怎样注册自己的网站
  • 虹口做网站价格重庆森林台词
  • 让iis做跳转网站app推广项目从哪接一手
  • 网站做适配手机要多久条友网
  • 网上购物商城网站开发论文免费推广软件哪个好
  • 河南郑州最新情况seo顾问服
  • 哪个网站做浏览器主页模板网站建设开发
  • 怎么样申请网站海口seo计费
  • 专门做av字幕的网站有哪些关键词优化的方法有哪些
  • 柳州做网站的公司seo网络推广企业
  • 青县网站建设西安seo整站优化