Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1003 B

  1. Shader "OvrAvatar/AvatarSurfaceShaderPBSV2" {
  2. Properties {
  3. _AlbedoMultiplier ("Albedo Multiplier", Color) = (1,1,1,1)
  4. _Albedo ("Albedo (RGB)", 2D) = "white" {}
  5. _Metallicness("Metallicness", 2D) = "grey" {}
  6. _GlossinessScale ("Glossiness Scale", Range(0,1)) = 0.5
  7. }
  8. SubShader {
  9. Tags { "RenderType"="Opaque" }
  10. LOD 200
  11. CGPROGRAM
  12. // Physically based Standard lighting model, and enable shadows on all light types
  13. #pragma surface surf Standard fullforwardshadows
  14. // Use shader model 3.0 target, to get nicer looking lighting
  15. #pragma target 3.0
  16. sampler2D _Albedo;
  17. sampler2D _Metallicness;
  18. struct Input {
  19. float2 uv_Albedo;
  20. };
  21. float _GlossinessScale;
  22. float4 _AlbedoMultiplier;
  23. void surf (Input IN, inout SurfaceOutputStandard o) {
  24. fixed4 c = tex2D (_Albedo, IN.uv_Albedo) * _AlbedoMultiplier;
  25. o.Albedo = c.rgb;
  26. o.Metallic = tex2D (_Metallicness, IN.uv_Albedo).r;
  27. o.Smoothness = _GlossinessScale;
  28. o.Alpha = 1.0;
  29. }
  30. ENDCG
  31. }
  32. FallBack "Diffuse"
  33. }