Unity Shader学习:预积分皮肤
思路:LUT+GGX+SSS
参考:https://zhuanlan.zhihu.com/p/70390192?utm_source=wechat_session
https://www.bilibili.com/video/BV1CD4y127Pv
https://blog.csdn.net/qq_36107199/article/details/103596547
Shader "Zzc/ZzcSkinTest"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {
}
_NormalTex("NormalTex",2D)="white"{
}
_SSSLUT("SSSLUT",2D)="white"{
}
_ThicknessTex("ThicknessTex",2D)="white"{
}
_CurveFactor("CurveFactor",Range(0,1))=1
_Smoothness("Smoothness",Range(0,1))=0.5
_FrontSurfaceDistortion("FrontSurfaceDistortion",float) = 1
_BackSurfaceDistortion("BackSurfaceDistortion",float) = 1
[HDR]_InteriorColor("InteriorColor",Color) = (1,1,1,1)
_InteriorColorPower("InteriorColorPower",float) = 1
_FrontSSSIntensity("FrontSSSIntensity",float) = 1
_BackSSSIntensity("BackSSSIntensity",float)=1
}
SubShader
{
Tags {
"RenderType"="Opaque" "LightMode"="ForwardBase"}
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityStandardBRDF.cginc"
#include "UnityCG.cginc"
struct v2f
{
float4 uv : TEXCOORD0;
float4 pos : SV_POSITION;
float4 T2W0