layout: post
title: “中级Shader教程24 两种雨实现方式”
date: 2018-04-26 16:09:03
author: Jiepeng Tan
categories:
- shader tutorial
tags: shader_tutorial theory shader
img_path: /assets/img/blog/ShaderTutorial2D/Snow
mathjax: true
Shader 视频教程
1.思想
1.和下雨特效制作一样,通过UV拉伸来呈现速度感,来表现雨
2.实现
1.简单版本
float2 ruv = uv / float2(_ScreenParams.x/_ScreenParams.y,1.0);//原始uv
//宽高比正常uv
uv = (ruv * 2.0 - 1.0) * float2(_ScreenParams.x/_ScreenParams.y,1.0);
float2 st = uv * float2(.5+(ruv.y+1.0)*0.5, .03)+float2