1:先上图(参考shadertoy的)
2:在上代码:
Shader "Unlit/candle"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
_iResolutionX("_iResolutionX", float) = 1920.0
_iResolutionY("_iResolutionY", float) = 1080.0
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;