如何通过Lightweight Render Pipeline Unity中的代码修改着色器的Albedo

时间:2019-09-03 04:02:17

标签: unity3d shader

我想知道是否可以在轻量级渲染管道着色器中运行类似此功能的东西(来自标准表面着色器):

 void surf (Input IN, inout SurfaceOutputStandard o) {
     // Albedo comes from a texture tinted by color
     fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
     o.Albedo = c.rgb;
     // Metallic and smoothness come from slider variables
     o.Metallic = _Metallic;
     o.Smoothness = _Glossiness;
     o.Alpha = c.a;
  }

我感兴趣的是修改Albedo的{​​{1}},相当于SurfaceOutputStandard的轻量级渲染管道。通过在Unity中对着色器进行自定义编程来做这样的事情是否可能?如果可以,怎么办?

如果我不太清楚,请随时询问更多信息。 :)

0 个答案:

没有答案