修改shader

This commit is contained in:
李浩 2025-05-13 14:07:38 +08:00
parent 5515cd081a
commit 17b260b80f
4 changed files with 281 additions and 70 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 152485fa1999deb44a624dc9f4124904
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -137,7 +137,7 @@ Shader "Unlit/ShinShader"
half ndoth=max(dot(nTs,hDirWS),0.0001); half ndoth=max(dot(nTs,hDirWS),0.0001);
half ndotl=max(dot(nTs,lDirWS),0.0001); half ndotl=max(dot(nTs,lDirWS),0.0001);
//Texture sample //Texture sample
half4 var_Albedo=SAMPLE_TEXTURE2D(_MainTex,sampler_MainTex,i.uv.xy); half4 var_Albedo=SAMPLE_TEXTURE2D(_MainTex,sampler_MainTex,i.uv.xy)*_Color;
//return float4(var_Albedo*0.03); //return float4(var_Albedo*0.03);
//直接光漫反射对rgb三个方向的ndl进行模糊分别采样rgb的SSS颜色 //直接光漫反射对rgb三个方向的ndl进行模糊分别采样rgb的SSS颜色
half rndotl=dot(nTsBlur,lDirWS)*0.5+0.5;//红色穿透性最高,所以模糊度最高 half rndotl=dot(nTsBlur,lDirWS)*0.5+0.5;//红色穿透性最高,所以模糊度最高