当前位置:网站首页>顶点动画-VetexAnimation
顶点动画-VetexAnimation
2022-08-09 00:08:00 【ThomasQxx】
Shader "QShader/VertexAnimation"{
Properties{
_MainTex("Main Texture",2D) = "white"{
}
_XSpeed("X Axis Speed",Float) = 1.0
_YSpeed("Y Axis Speed",Float) = 1.0
}
SubShader{
pass {
Tags{
"LightMode" = "Always"}
CGPROGRAM
#pragma vertex Vertex
#pragma fragment Fragment
#include "UnityCG.cginc"
struct v2f {
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
sampler2D _MainTex;
float _XSpeed;
float _YSpeed;
v2f Vertex(appdata_base v) {
v2f o;
v.vertex.y += sin(_Time.y + v.vertex.x * _XSpeed + v.vertex.z * _YSpeed);
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = v.texcoord;
return o;
}
fixed4 Fragment(v2f i) :SV_TARGET{
return tex2D(_MainTex,i.uv);
}
ENDCG
}
}
}
边栏推荐
猜你喜欢
随机推荐
测试计划包括哪些内容?目的和意义是什么?
2017年11月历史文章汇总
穿越派(v3.14)版本可以试用啦!
C# 如何关联键盘按钮 (KeyChar/KeyCode值 KeyPress/KeyDown事件 区别)
如何升级穿越派V3.14版本?
GRPC学习(An RPC library and framework)
【全排列】
node版本一键切换
snmp获取agent OID,及MibBrowser使用
MySQL导入导出数据库
二 分析C#中的结构
ImportError: cannot import name downsample
自学FPGA:Verilog基本语法规则(一)
HCIP2---第一天实验
conda xgboost 安装 jupyter notebook
了解CI/CD流水线
C-关键字之volatile
关于字符串根据字典序排序的方法
After the sessionStorage value is changed, the value obtained by the page using window.sessionStorage.getItem() will not be updated
ResNet 6大变体对比