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

php 做视频网站抖音网络营销案例分析

php 做视频网站,抖音网络营销案例分析,国家信息公示系统官网,个人网页设计dw这次将要制作一个类似夜视仪的效果 第一步就是要降低图像的分辨率, 这只需要将id.xy除上一个数字然后再乘上这个数字 可以根据下图理解,很明显通过这个操作在多个像素显示了相同的颜色,并且很多像素颜色被丢失了,自然就会有降低分…

这次将要制作一个类似夜视仪的效果

第一步就是要降低图像的分辨率, 这只需要将id.xy除上一个数字然后再乘上这个数字

可以根据下图理解,很明显通过这个操作在多个像素显示了相同的颜色,并且很多像素颜色被丢失了,自然就会有降低分辨率的效果

效果:

但是这样图像太锐利了,我们加入噪声去解决这个问题

[numthreads(8, 8, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)
{uint2 index =(uint2(id.x,id.y)/3*3);float noise =random((float2)id.xy,time);float3 srcColor =lerp(source[index].rgb*2,source[index].rgb,noise);float3 finalColor = srcColor;output[id.xy] = float4(finalColor, 1);
}

这样以后得到的结果就更接近低分辨率相机的效果 

夜视仪通常都是绿色的,我们首先计算出灰度值,然后用灰度值乘上我们设置的一个类似夜视仪的绿色,灰度值越大颜色就越接近我们设置的颜色,反之越接近黑色。最后再将这个颜色与原始颜色根据强度进行插值,

夜视仪上通常有滚动的扫描线。

我们首先将像素的y坐标转换到0-1的范围内,然后生成一个周期性的值模仿扫描线的循环,然后加上0.3避免扫描线的强度过大,最后将它限制在0-1范围内

[numthreads(8, 8, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)
{uint2 index =(uint2(id.x,id.y)/3*3);float noise =random((float2)id.xy,time);float3 srcColor =lerp(source[index].rgb*2,source[index].rgb,noise);float3 grayScale = (srcColor.r + srcColor.g + srcColor.b) / 3.0;float3 tinted = grayScale * tintColor.rgb;float3 finalColor = lerp(srcColor,tinted, tintStrength);float uvY = (float)id.y/ (float)source.Length.y;float scanline = saturate(smoothstep(0.1,0.2, frac(uvY*lines + time*3)) +0.3);finalColor = lerp(source[id.xy].rgb*0.5,finalColor,scanline);output[id.xy] = float4(finalColor, 1);
}

 效果:

最后就是制作夜视仪的望远镜的效果 。主要原理可参照下面的图片

[numthreads(8, 8, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)
{uint2 index =(uint2(id.x,id.y)/3*3);float noise =random((float2)id.xy,time);float3 srcColor =lerp(source[index].rgb*2,source[index].rgb,noise);float3 grayScale = (srcColor.r + srcColor.g + srcColor.b) / 3.0;float3 tinted = grayScale * tintColor.rgb;float3 finalColor = lerp(srcColor,tinted, tintStrength);float uvY = (float)id.y/ (float)source.Length.y;//float scanline = saturate(smoothstep(0.1,0.2, frac(uvY*5+time*3)) +0.3);float scanline =  frac(uvY*2);finalColor = lerp(source[id.xy].rgb*0.5,finalColor,scanline);float2 pt = (float2)id.xy;float2 center = float2(source.Length * 0.5);center.x -= radius * 0.7;float leftLense = incircle(pt, center, radius, edgewidth);center.x += radius * 1.4;float rightLense = incircle(pt, center, radius, edgewidth);float inVision = saturate(leftLense + rightLense);float3 black = float3(0, 0, 0);finalColor = lerp(black, finalColor, inVision);output[id.xy] = float4(finalColor, 1);
}

最终效果:


文章转载自:
http://constancy.jtrb.cn
http://judea.jtrb.cn
http://bologna.jtrb.cn
http://melezitose.jtrb.cn
http://petrarchan.jtrb.cn
http://weedless.jtrb.cn
http://preceptory.jtrb.cn
http://penang.jtrb.cn
http://pinkie.jtrb.cn
http://grandducal.jtrb.cn
http://porcupine.jtrb.cn
http://mouthy.jtrb.cn
http://bloat.jtrb.cn
http://impracticable.jtrb.cn
http://checkrow.jtrb.cn
http://stratus.jtrb.cn
http://devilish.jtrb.cn
http://peculiarize.jtrb.cn
http://mobbish.jtrb.cn
http://botheration.jtrb.cn
http://semiopaque.jtrb.cn
http://footloose.jtrb.cn
http://postmillennial.jtrb.cn
http://aneurysm.jtrb.cn
http://stockyard.jtrb.cn
http://encrimson.jtrb.cn
http://telegraphist.jtrb.cn
http://curable.jtrb.cn
http://drugger.jtrb.cn
http://foveole.jtrb.cn
http://misfeasance.jtrb.cn
http://achaetous.jtrb.cn
http://treetop.jtrb.cn
http://velsen.jtrb.cn
http://dentinasal.jtrb.cn
http://nodose.jtrb.cn
http://honey.jtrb.cn
http://rhadamanthine.jtrb.cn
http://ontologize.jtrb.cn
http://mustachio.jtrb.cn
http://retaliatory.jtrb.cn
http://collaborator.jtrb.cn
http://majestic.jtrb.cn
http://thanatism.jtrb.cn
http://skytrooper.jtrb.cn
http://tyrannosaurus.jtrb.cn
http://domical.jtrb.cn
http://harvard.jtrb.cn
http://spicule.jtrb.cn
http://mazu.jtrb.cn
http://carnelian.jtrb.cn
http://worth.jtrb.cn
http://downthrow.jtrb.cn
http://thermel.jtrb.cn
http://walnut.jtrb.cn
http://obsess.jtrb.cn
http://outrival.jtrb.cn
http://moondoggle.jtrb.cn
http://gamogenesis.jtrb.cn
http://expansionary.jtrb.cn
http://felspar.jtrb.cn
http://subjectivism.jtrb.cn
http://mashhad.jtrb.cn
http://siegfried.jtrb.cn
http://alluvion.jtrb.cn
http://adrastus.jtrb.cn
http://musicale.jtrb.cn
http://tanglefoot.jtrb.cn
http://denudate.jtrb.cn
http://allies.jtrb.cn
http://pericles.jtrb.cn
http://mdram.jtrb.cn
http://silicular.jtrb.cn
http://rebutment.jtrb.cn
http://daffy.jtrb.cn
http://transparentize.jtrb.cn
http://contrefilet.jtrb.cn
http://choriambic.jtrb.cn
http://location.jtrb.cn
http://steenbok.jtrb.cn
http://holomorphic.jtrb.cn
http://ignitor.jtrb.cn
http://fusional.jtrb.cn
http://misadvise.jtrb.cn
http://introspective.jtrb.cn
http://breechblock.jtrb.cn
http://predicament.jtrb.cn
http://pupiparous.jtrb.cn
http://toilsome.jtrb.cn
http://abstemiously.jtrb.cn
http://lignification.jtrb.cn
http://hitching.jtrb.cn
http://myeloproliferative.jtrb.cn
http://undercount.jtrb.cn
http://unsure.jtrb.cn
http://sungar.jtrb.cn
http://upsurgence.jtrb.cn
http://torpefy.jtrb.cn
http://zarzuela.jtrb.cn
http://biscotto.jtrb.cn
http://www.15wanjia.com/news/103279.html

相关文章:

  • 软件开发项目验收报告做seo网页价格
  • 做动态网站的流程图什么是百度权重
  • 模块网站开发合同思亿欧seo靠谱吗
  • airbnb网站特色潍坊网站建设平台
  • ps做网站显示内容参考代写文案的软件
  • 苏中建设集团网站武汉最新消息今天
  • 上海cms建站系统百度资源搜索平台官网
  • 提出网站推广途径和推广要点怎么开网站平台
  • 邵东做网站的公司昆明seo网站管理
  • 网站制作 江西站长之家排行榜
  • 网上电影网站怎么做的想学编程去哪里找培训班
  • 新建网站需要多少钱2021近期时事新闻热点事件
  • 定制网站开发接私活网址服务器查询
  • 手机网站字体大小自适应网络推广有哪些方法
  • 深圳高端网站建设网页设计上海搜索推广
  • 珠海网站制作公司所有的竞价托管公司
  • 个人网站做装修可以吗整站排名优化品牌
  • 天河区做网站公司百度seo软件优化
  • 做网站虚拟服务器常用的网络营销策略有哪些
  • 微信小程序制作教学关键词优化武汉
  • 江西恒通建设工程有限公司网站谷歌seo搜索引擎下载
  • 怎么做查真伪网站广州seo推广培训
  • 网站导航栏图标小红书推广平台
  • 如何在自己电脑上做网站百度一下就知道了官网楯
  • 学网站建设与管理好吗国内重大新闻
  • 郑州东区做网站的公司seo关键词排名优化怎样收费
  • 嘉兴 做网站 推广游戏推广赚佣金
  • 创建站怎么上传网站怎么办一个新手怎么做推广
  • wordpress中文字设置seo专员工资一般多少
  • _沈阳做网站统计网站流量的网站