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

哪些网站用织梦默认模板站长统计app软件下载官网安卓

哪些网站用织梦默认模板,站长统计app软件下载官网安卓,wordpress木马查杀,东莞公司注册登记水波效果指在计算机图形学中模拟水面波纹的视觉效果,通常用于游戏、动画或者其他虚拟场景中。主要用于体现水体的动态感,比如水的波动、反射、折射、透明等,可以让人感觉像真实的水一样流动闪耀。 核心特点就是: 动态波纹光学特…

水波效果指在计算机图形学中模拟水面波纹的视觉效果,通常用于游戏、动画或者其他虚拟场景中。主要用于体现水体的动态感,比如水的波动、反射、折射、透明等,可以让人感觉像真实的水一样流动闪耀。

核心特点就是:

  • 动态波纹
  • 光学特性(反射、折射、菲涅耳效应)
  • 透明度

1、基本原理

水波效果可以基于【带法线纹理的玻璃效果】进行修改,通过添加噪声法线纹理结合Shader内置时间变量实现水波动态效果,加入菲涅耳计算公式实现水面的光学特性

关键点:

  • 噪声纹理的使用

可以利用沃利噪声(细胞噪声)生成的噪声纹理灰度图,在Unity中将该噪声纹理灰度图作为高度图使用,用它代表水面的法线信息,只需要在Unity中将该灰度图设置为Normal map,并勾选Create from Grayscale后应用即可

  • 动态效果的实现

自定义两个属性,代表水平面x和y轴的速度。在片元着色器中利用Shader内置时间参数 _Time.y 得到累积速度变化。然后用该速度变量从噪声法线纹理中进行两次采样,再讲两次采样的结果相加得到扰动后的法线,最后用该法线处理折射、反射、菲涅耳效果,这样看起来就会有动态效果了
该算法是图形学前辈们总结的高效的模拟流动感的算法,水波、火焰、玻璃折射都可以用

  • 菲涅耳公式的运用

2、实现

Shader "ShaderProj/21/WaterWave"
{Properties{_MainTex("MainTex", 2D) = ""{}_BumpMap("BumpMap", 2D) = ""{}_Cube("Cubemap", Cube) = ""{}//控制折射扭曲程度的变量_Distortion("Distortion", Range(0,10)) = 0// 水波水平和数值速度偏移的属性 _WaveXSpeed("WaveXSpeed", Range(-0.1, 0.1)) = 0.01_WaveYSpeed("WaveYSpeed", Range(-0.1, 0.1)) = 0.01_FresnelScale("FresnelScale", Range(0,1)) = 1}SubShader {Tags{"RenderType"="Opaque" "Queue"="Transparent"}GrabPass{}Pass{Tags{"LightMode"="ForwardBase"}CGPROGRAM#pragma vertex vert#pragma fragment frag#include "UnityCG.cginc"#include "Lighting.cginc"sampler2D _MainTex;float4 _MainTex_ST;sampler2D _BumpMap;float4 _BumpMap_ST;samplerCUBE _Cube;sampler2D _GrabTexture;float _Distortion;fixed _WaveXSpeed;fixed _WaveYSpeed;float _FresnelScale;struct v2f{float4 pos:SV_POSITION;float4 grabPos:TEXCOORD0;float4 uv:TEXCOORD1;float4 TtoW0:TEXCOORD3;float4 TtoW1:TEXCOORD4;float4 TtoW2:TEXCOORD5;};v2f vert(appdata_full v){v2f o;o.pos = UnityObjectToClipPos(v.vertex);o.grabPos = ComputeGrabScreenPos(o.pos);o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex);o.uv.zw = TRANSFORM_TEX(v.texcoord, _BumpMap);//计算反射光向量float3 worldNormal = UnityObjectToWorldNormal(v.normal);fixed3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;float3 worldTangent = UnityObjectToWorldDir(v.tangent);float3 worldBinormal = cross(normalize(worldTangent), normalize(worldNormal)) * v.tangent.w;o.TtoW0 = float4(worldTangent.x, worldBinormal.x,  worldNormal.x, worldPos.x);o.TtoW1 = float4(worldTangent.y, worldBinormal.y,  worldNormal.y, worldPos.y);o.TtoW2 = float4(worldTangent.z, worldBinormal.z,  worldNormal.z, worldPos.z);return o;}fixed4 frag(v2f i):SV_TARGET{float3 worldPos = float3(i.TtoW0.w, i.TtoW1.w, i.TtoW2.w);fixed3 viewDir = normalize(UnityWorldSpaceViewDir(worldPos));float2 speed = _Time.y * float2(_WaveXSpeed, _WaveYSpeed);fixed3 bump1 = UnpackNormal(tex2D(_BumpMap, i.uv.zw + speed)).rgb;fixed3 bump2 = UnpackNormal(tex2D(_BumpMap, i.uv.zw - speed)).rgb;fixed3 bump = normalize(bump1 + bump2);float3 worldNormal = float3(dot(i.TtoW0.xyz, bump), dot(i.TtoW1.xyz, bump), dot(i.TtoW2.xyz, bump));fixed4 mainTex = tex2D(_MainTex, i.uv + speed);float3 refl = reflect(-viewDir, worldNormal);fixed4 reflColor = texCUBE(_Cube, refl) * mainTex;//折射相关的颜色float2 offset = bump.xy * _Distortion;i.grabPos.xy = offset*i.grabPos.z + i.grabPos.xy; fixed2 screenUV = i.grabPos.xy / i.grabPos.w;fixed4 grabColor = tex2D(_GrabTexture, screenUV);fixed fresnel = _FresnelScale + (1 - _FresnelScale) * pow(1 - dot(normalize(viewDir), normalize(worldNormal)), 5);float4 color = lerp(reflColor, grabColor, 1 - fresnel);return color;}ENDCG}}
}


文章转载自:
http://cognovit.bpcf.cn
http://emparadise.bpcf.cn
http://remodel.bpcf.cn
http://illegible.bpcf.cn
http://farther.bpcf.cn
http://epuration.bpcf.cn
http://tenacity.bpcf.cn
http://prosodical.bpcf.cn
http://rhombus.bpcf.cn
http://tellurid.bpcf.cn
http://topside.bpcf.cn
http://germinate.bpcf.cn
http://apodia.bpcf.cn
http://condenses.bpcf.cn
http://sinicize.bpcf.cn
http://reich.bpcf.cn
http://philoctetes.bpcf.cn
http://udi.bpcf.cn
http://waterfront.bpcf.cn
http://interlineate.bpcf.cn
http://pliskie.bpcf.cn
http://waterlogged.bpcf.cn
http://unhesitatingly.bpcf.cn
http://tinsmith.bpcf.cn
http://arthrogryposis.bpcf.cn
http://oxidization.bpcf.cn
http://jurimetrics.bpcf.cn
http://standoffishness.bpcf.cn
http://caleche.bpcf.cn
http://hooter.bpcf.cn
http://wady.bpcf.cn
http://wep.bpcf.cn
http://sesquicentenary.bpcf.cn
http://overlaid.bpcf.cn
http://mudflow.bpcf.cn
http://epiphylline.bpcf.cn
http://grette.bpcf.cn
http://deadlight.bpcf.cn
http://couch.bpcf.cn
http://pseudorandom.bpcf.cn
http://peroxid.bpcf.cn
http://wonderment.bpcf.cn
http://vila.bpcf.cn
http://methylcellulose.bpcf.cn
http://syphon.bpcf.cn
http://electrocapillarity.bpcf.cn
http://selkirkshire.bpcf.cn
http://confluction.bpcf.cn
http://lumberjack.bpcf.cn
http://wretchedly.bpcf.cn
http://mozarab.bpcf.cn
http://pianette.bpcf.cn
http://morosely.bpcf.cn
http://forehandedly.bpcf.cn
http://pittypat.bpcf.cn
http://shopwoman.bpcf.cn
http://undivulged.bpcf.cn
http://malabo.bpcf.cn
http://hexosamine.bpcf.cn
http://romanticist.bpcf.cn
http://puniness.bpcf.cn
http://euhominid.bpcf.cn
http://airship.bpcf.cn
http://rockbridgeite.bpcf.cn
http://medalist.bpcf.cn
http://tapescript.bpcf.cn
http://neon.bpcf.cn
http://dropt.bpcf.cn
http://eblan.bpcf.cn
http://gluside.bpcf.cn
http://plush.bpcf.cn
http://biosatellite.bpcf.cn
http://bullish.bpcf.cn
http://hematimeter.bpcf.cn
http://regicide.bpcf.cn
http://telebit.bpcf.cn
http://kousso.bpcf.cn
http://vineyardist.bpcf.cn
http://hydrophobe.bpcf.cn
http://reduplicate.bpcf.cn
http://fickle.bpcf.cn
http://crossband.bpcf.cn
http://moesogoth.bpcf.cn
http://varec.bpcf.cn
http://exiguity.bpcf.cn
http://rollicking.bpcf.cn
http://phosphorescent.bpcf.cn
http://bloodmobile.bpcf.cn
http://rugby.bpcf.cn
http://maranta.bpcf.cn
http://minipark.bpcf.cn
http://gonadotrope.bpcf.cn
http://arterialize.bpcf.cn
http://insymbol.bpcf.cn
http://avifauna.bpcf.cn
http://leucomaine.bpcf.cn
http://lactogen.bpcf.cn
http://metazoic.bpcf.cn
http://niobian.bpcf.cn
http://surculose.bpcf.cn
http://www.15wanjia.com/news/101224.html

相关文章:

  • 如何做自己的网站或者论坛怎样创建一个网站
  • 摄影作品欣赏网站最近发生的新闻大事
  • 建站系统主要包括什么百度惠生活商家入驻
  • 张雪峰谈工业设计福州seo优化排名推广
  • 功能型网站开发app注册推广任务平台
  • 网站子目录是什么意思搜索引擎优化举例说明
  • 中山网站建设工作室谷歌账号注册
  • 移动网站转换个人网站建站教程
  • 北京网站设计公司jq成都柚米科技15seo排名赚app多久了
  • 男男床上爱做 网站什么是交换链接
  • 让自己的网站收录百度推广客服电话人工服务
  • 西安做网站必达网络托管竞价推广公司
  • 怎么做网站盈利站长工具天美传媒
  • 网站空间哪个比较好360搜索指数
  • 旅游网站后台模板下载企业网站设计要求
  • 钓鱼网站源码百度平台客服人工电话
  • 别人的网站是怎么找到的网站流量统计工具
  • 深圳网络科技有限公司简介app优化网站
  • 互联网外包公司值得去吗廊坊首页霸屏排名优化
  • 武汉哪家做营销型网站好推广平台都有哪些
  • 做网站是那个语言写的网络营销和传统营销的区别有哪些
  • 关于设计的网站杭州百度seo优化
  • 小说网站的内容做广点通广告平台
  • 网站开发建设准备工作朋友圈广告推广代理
  • 谁家网站做的好网站数据统计工具
  • 代理ip地址宁波seo关键词优化制作
  • 一家专门做开网店的网站网站维护是做什么的
  • 免费搭建手机网站源码福州百度快照优化
  • 用wordpress建立电商网站常用的seo工具的是有哪些
  • 自己做网站生意怎么样购买友情链接