浏览代码

Added Occlusion keyword. Updated materials. More refactor on the shader.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
9ea83a56
共有 50 个文件被更改,包括 172 次插入165 次删除
  1. 1
      ScriptableRenderPipeline/LightweightPipeline/Editor/ShaderGUI/LightweightStandardShaderGUI.cs
  2. 5
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBlit.shader
  3. 67
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightCore.cginc
  4. 7
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightInput.cginc
  5. 52
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightLighting.cginc
  6. 58
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPassLit.cginc
  7. 14
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShadows.cginc
  8. 1
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShaderPBS.shader
  9. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Limbs_spec.mat
  10. 3
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Torso_spec.mat
  11. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/025_Shader_PBRvalidation_Metallic/Adam/Materials/Crowd_LOD0_Mat_Limbs_metallic.mat
  12. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/025_Shader_PBRvalidation_Metallic/Adam/Materials/Crowd_LOD0_Mat_Torso_metallic.mat
  13. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/kabel.mat
  14. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/korpus.mat
  15. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/kozhuh.mat
  16. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/motor.mat
  17. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/spindle.mat
  18. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/stanina.mat
  19. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/stanina_vk.mat
  20. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/top.mat
  21. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/val.mat
  22. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/Challenge-Brick.mat
  23. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/Roofing.mat
  24. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/ShoreRockSand.mat
  25. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/bark.mat
  26. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/herringbone_brick_floor.mat
  27. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/metal_aluminium_directional.mat
  28. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/metal_brushed_copper.mat
  29. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/rocks_dirt_ground.mat
  30. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_Roofing.mat
  31. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_Roofing_gloss.mat
  32. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_rocks_dirt_ground.mat
  33. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_rocks_dirt_ground_gloss.mat
  34. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Hole_mesh.mat
  35. 4
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Hole_mesh_gloss.mat
  36. 4
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_IndustrialGlass_gloss.mat
  37. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Roofing.mat
  38. 4
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Roofing_gloss.mat
  39. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_rocks_dirt_ground.mat
  40. 4
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_rocks_dirt_ground_gloss.mat
  41. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_Roofing.mat
  42. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_Roofing_highlights.mat
  43. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_rocks_dirt_ground.mat
  44. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_rocks_dirt_ground_highlights.mat
  45. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_Roofing.mat
  46. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_Roofing_highlights.mat
  47. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_rocks_dirt_ground.mat
  48. 1
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_rocks_dirt_ground_highlights.mat
  49. 9
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBRDF.cginc.meta
  50. 54
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBRDF.cginc

1
ScriptableRenderPipeline/LightweightPipeline/Editor/ShaderGUI/LightweightStandardShaderGUI.cs


LightweightShaderHelper.SetKeyword(material, "_SPECULARHIGHLIGHTS_OFF", material.GetFloat("_SpecularHighlights") == 0.0f);
LightweightShaderHelper.SetKeyword(material, "_GLOSSYREFLECTIONS_OFF", material.GetFloat("_GlossyReflections") == 0.0f);
LightweightShaderHelper.SetKeyword(material, "_OCCLUSIONMAP", material.GetTexture("_OcclusionMap"));
LightweightShaderHelper.SetKeyword(material, "_PARALLAXMAP", material.GetTexture("_ParallaxMap"));
LightweightShaderHelper.SetKeyword(material, "_DETAIL_MULX2", material.GetTexture("_DetailAlbedoMap") || material.GetTexture("_DetailNormalMap"));

5
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBlit.shader


Shader "Hidden/ScriptableRenderPipeline/LightweightPipeline/Blit"
{
Properties
{
_BlitTex("Texture", 2D) = "" {}
}
SubShader
{
Tags { "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline"}

67
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightCore.cginc


#include "LightweightInput.cginc"
#include "LightweightLighting.cginc"
#include "LightweightBRDF.cginc"
#if defined(_HARD_SHADOWS) || defined(_SOFT_SHADOWS) || defined(_HARD_SHADOWS_CASCADES) || defined(_SOFT_SHADOWS_CASCADES)
#define _SHADOWS
#endif
#if defined(_HARD_SHADOWS_CASCADES) || defined(_SOFT_SHADOWS_CASCADES)
#define _SHADOW_CASCADES
#endif
#ifdef _SHADOWS
#endif
#define kDieletricSpec half4(0.04, 0.04, 0.04, 1.0 - 0.04) // standard dielectric reflectivity coef at incident angle (= 4%)
half SpecularReflectivity(half3 specular)
{
#if (SHADER_TARGET < 30)

#else
return max(max(specular.r, specular.g), specular.b);
#endif
}
inline void InitializeSurfaceData(LightweightVertexOutput i, out SurfaceData outSurfaceData)
{
float2 uv = i.uv01.xy;
half4 albedoAlpha = tex2D(_MainTex, uv);
outSurfaceData.albedo = LIGHTWEIGHT_GAMMA_TO_LINEAR(albedoAlpha.rgb) * _Color.rgb;
outSurfaceData.alpha = Alpha(albedoAlpha.a);
outSurfaceData.metallicSpecGloss = MetallicSpecGloss(uv, albedoAlpha);
outSurfaceData.normalWorld = Normal(i);
outSurfaceData.ao = OcclusionLW(uv);
outSurfaceData.emission = EmissionLW(uv);
}
inline void InitializeBRDFData(SurfaceData surfaceData, out BRDFData outBRDFData)
{
// BRDF SETUP
#ifdef _METALLIC_SETUP
half2 metallicGloss = surfaceData.metallicSpecGloss.ra;
half metallic = metallicGloss.r;
half smoothness = metallicGloss.g;
// We'll need oneMinusReflectivity, so
// 1-reflectivity = 1-lerp(dielectricSpec, 1, metallic) = lerp(1-dielectricSpec, 0, metallic)
// store (1-dielectricSpec) in kDieletricSpec.a, then
// 1-reflectivity = lerp(alpha, 0, metallic) = alpha + metallic*(0 - alpha) =
// = alpha - metallic * alpha
half oneMinusDielectricSpec = kDieletricSpec.a;
half oneMinusReflectivity = oneMinusDielectricSpec - metallic * oneMinusDielectricSpec;
half reflectivity = 1.0 - oneMinusReflectivity;
outBRDFData.diffuse = surfaceData.albedo * oneMinusReflectivity;
outBRDFData.specular = lerp(kDieletricSpec.rgb, surfaceData.albedo, metallic);
#else
half3 specular = surfaceData.metallicSpecGloss.rgb;
half smoothness = surfaceData.metallicSpecGloss.a;
half reflectivity = SpecularReflectivity(specular);
outBRDFData.diffuse = surfaceData.albedo * (half3(1.0h, 1.0h, 1.0h) - specular);
outBRDFData.specular = specular;
#endif
outBRDFData.grazingTerm = saturate(smoothness + reflectivity);
outBRDFData.perceptualRoughness = 1.0h - smoothness;
outBRDFData.roughness = outBRDFData.perceptualRoughness * outBRDFData.perceptualRoughness;
#ifdef _ALPHAPREMULTIPLY_ON
half alpha = surfaceData.alpha;
outBRDFData.diffuse *= alpha;
surfaceData.alpha = reflectivity + alpha * (1.0 - reflectivity);
#endif
}

7
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightInput.cginc


half3 specular;
half perceptualRoughness;
half roughness;
half oneMinusReflectivity;
half grazingTerm;
};

half OcclusionLW(float2 uv)
{
#if (SHADER_TARGET < 30)
#ifdef _OCCLUSIONMAP
#if (SHADER_TARGET < 30)
// SM20: instruction count limitation
// SM20: simpler occlusion
return tex2D(_OcclusionMap, uv).g;

#endif
#else
return 1.0;
#endif
}

52
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightLighting.cginc


#ifndef LIGHTWEIGHT_LIGHTING_INCLUDED
#ifndef LIGHTWEIGHT_LIGHTING_INCLUDED
#define PI 3.14159265359f
// Based on Minimalist CookTorrance BRDF
// Implementation is slightly different from original derivation: http://www.thetenthplanet.de/archives/255
//
// * NDF [Modified] GGX
// * Modified Kelemen and Szirmay-​Kalos for Visibility term
// * Fresnel approximated with 1/LdotH
half3 LightweightBDRF(BRDFData brdfData, half roughness2, half3 normal, half3 lightDirection, half3 viewDir)
{
#ifndef _SPECULARHIGHLIGHTS_OFF
half3 halfDir = Unity_SafeNormalize(lightDirection + viewDir);
half NoH = saturate(dot(normal, halfDir));
half LoH = saturate(dot(lightDirection, halfDir));
// GGX Distribution multiplied by combined approximation of Visibility and Fresnel
// See "Optimizing PBR for Mobile" from Siggraph 2015 moving mobile graphics course
// https://community.arm.com/events/1155
half d = NoH * NoH * (roughness2 - 1.h) + 1.00001h;
half LoH2 = LoH * LoH;
half specularTerm = roughness2 / ((d * d) * max(0.1h, LoH2) * (brdfData.roughness + 0.5h) * 4);
// on mobiles (where half actually means something) denominator have risk of overflow
// clamp below was added specifically to "fix" that, but dx compiler (we convert bytecode to metal/gles)
// sees that specularTerm have only non-negative terms, so it skips max(0,..) in clamp (leaving only min(100,...))
#if defined (SHADER_API_MOBILE)
specularTerm = specularTerm - 1e-4h;
#endif
#if defined (SHADER_API_MOBILE)
specularTerm = clamp(specularTerm, 0.0, 100.0); // Prevent FP16 overflow on mobiles
#endif
half3 color = specularTerm * brdfData.specular + brdfData.diffuse;
return color;
#else
return brdfData.diffuse;
#endif
}
half3 LightweightBRDFIndirect(BRDFData brdfData, UnityIndirect indirect, half roughness2, half fresnelTerm)
{
half3 c = indirect.diffuse * brdfData.diffuse;
float surfaceReduction = 1.0 / (roughness2 + 1.0);
c += surfaceReduction * indirect.specular * lerp(brdfData.specular, brdfData.grazingTerm, fresnelTerm);
return c;
}
UnityIndirect LightweightGI(float2 lightmapUV, half3 ambientColor, half3 normalWorld, half3 reflectVec, half occlusion, half perceptualRoughness)
{

58
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPassLit.cginc


#include "LightweightCore.cginc"
#define kDieletricSpec half4(0.04, 0.04, 0.04, 1.0 - 0.04) // standard dielectric reflectivity coef at incident angle (= 4%)
inline void InitializeSurfaceData(LightweightVertexOutput i, out SurfaceData outSurfaceData)
{
float2 uv = i.uv01.xy;
half4 albedoAlpha = tex2D(_MainTex, uv);
outSurfaceData.albedo = LIGHTWEIGHT_GAMMA_TO_LINEAR(albedoAlpha.rgb) * _Color.rgb;
outSurfaceData.alpha = Alpha(albedoAlpha.a);
outSurfaceData.metallicSpecGloss = MetallicSpecGloss(uv, albedoAlpha);
outSurfaceData.normalWorld = Normal(i);
outSurfaceData.ao = OcclusionLW(uv);
outSurfaceData.emission = EmissionLW(uv);
}
inline void InitializeBRDFData(SurfaceData surfaceData, out BRDFData outBRDFData)
{
// BRDF SETUP
#ifdef _METALLIC_SETUP
half2 metallicGloss = surfaceData.metallicSpecGloss.ra;
half metallic = metallicGloss.r;
half smoothness = metallicGloss.g;
// We'll need oneMinusReflectivity, so
// 1-reflectivity = 1-lerp(dielectricSpec, 1, metallic) = lerp(1-dielectricSpec, 0, metallic)
// store (1-dielectricSpec) in kDieletricSpec.a, then
// 1-reflectivity = lerp(alpha, 0, metallic) = alpha + metallic*(0 - alpha) =
// = alpha - metallic * alpha
half oneMinusDielectricSpec = kDieletricSpec.a;
half oneMinusReflectivity = oneMinusDielectricSpec - metallic * oneMinusDielectricSpec;
half reflectivity = 1.0 - oneMinusReflectivity;
outBRDFData.diffuse = surfaceData.albedo * oneMinusReflectivity;
outBRDFData.specular = lerp(kDieletricSpec.rgb, surfaceData.albedo, metallic);
outBRDFData.oneMinusReflectivity = oneMinusReflectivity;
#else
half3 specular = surfaceData.metallicSpecGloss.rgb;
half smoothness = surfaceData.metallicSpecGloss.a;
half reflectivity = SpecularReflectivity(specular);
outBRDFData.diffuse = surfaceData.albedo * (half3(1.0h, 1.0h, 1.0h) - specular);
outBRDFData.specular = specular;
outBRDFData.oneMinusReflectivity = 1.0h - reflectivity;
#endif
outBRDFData.grazingTerm = saturate(smoothness + reflectivity);
outBRDFData.perceptualRoughness = 1.0h - smoothness;
outBRDFData.roughness = outBRDFData.perceptualRoughness * outBRDFData.perceptualRoughness;
#ifdef _ALPHAPREMULTIPLY_ON
half alpha = surfaceData.alpha;
outBRDFData.diffuse *= alpha;
surfaceData.alpha = reflectivity + alpha * oneMinusReflectivity;
#endif
}
LightweightVertexOutput LitPassVertex(LightweightVertexInput v)
{
LightweightVertexOutput o = (LightweightVertexOutput)0;

#endif
half NdotL = saturate(dot(normal, lightDirection));
half3 radiance = light.color * (lightAtten * NdotL);
color += LightweightBDRF(brdfData, roughness2, normal, lightDirection, i.viewDir.xyz) * radiance;
}
#endif

14
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightShadows.cginc


#define LIGHTWEIGHT_SHADOWS_INCLUDED
#define MAX_SHADOW_CASCADES 4
#if defined(_HARD_SHADOWS) || defined(_SOFT_SHADOWS) || defined(_HARD_SHADOWS_CASCADES) || defined(_SOFT_SHADOWS_CASCADES)
#define _SHADOWS
#endif
#if defined(_HARD_SHADOWS_CASCADES) || defined(_SOFT_SHADOWS_CASCADES)
#define _SHADOW_CASCADES
#endif
#ifdef _SHADOWS
#define SHADOW_ATTENUATION(vertexOutput, shadowDir) ComputeShadowAttenuation(vertexOutput, shadowDir)
#else
#define SHADOW_ATTENUATION(vertexOutput, shadowDir) 1.0h
#endif
sampler2D_float _ShadowMap;
float _PCFKernel[8];
float4x4 _WorldToShadow[MAX_SHADOW_CASCADES];

1
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShaderPBS.shader


#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
#pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF
#pragma shader_feature _ _GLOSSYREFLECTIONS_OFF
#pragma shader_feature _ _OCCLUSIONMAP
#pragma shader_feature _PARALLAXMAP
#pragma multi_compile _ _SINGLE_DIRECTIONAL_LIGHT _SINGLE_SPOT_LIGHT _SINGLE_POINT_LIGHT

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Limbs_spec.mat


m_PrefabInternal: {fileID: 0}
m_Name: Crowd_LOD0_Mat_Limbs_spec
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICSPECGLOSSMAP _NORMALMAP _SPECGLOSSMAP _SPECULAR_SETUP
m_ShaderKeywords: _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP _SPECGLOSSMAP _SPECULAR_SETUP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

3
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/024_Shader_PBRvalidation_Specular/Adam/Materials/Crowd_LOD0_Mat_Torso_spec.mat


m_PrefabInternal: {fileID: 0}
m_Name: Crowd_LOD0_Mat_Torso_spec
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _METALLICSPECGLOSSMAP _NORMALMAP _SPECGLOSSMAP _SPECULAR_SETUP
m_ShaderKeywords: _EMISSION _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP _SPECGLOSSMAP
_SPECULAR_SETUP
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/025_Shader_PBRvalidation_Metallic/Adam/Materials/Crowd_LOD0_Mat_Limbs_metallic.mat


m_Name: Crowd_LOD0_Mat_Limbs_metallic
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/025_Shader_PBRvalidation_Metallic/Adam/Materials/Crowd_LOD0_Mat_Torso_metallic.mat


m_Name: Crowd_LOD0_Mat_Torso_metallic
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/kabel.mat


m_Name: kabel
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/korpus.mat


m_Name: korpus
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _EMISSION _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/kozhuh.mat


m_Name: kozhuh
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/motor.mat


m_Name: motor
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/spindle.mat


m_Name: spindle
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/stanina.mat


m_Name: stanina
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/stanina_vk.mat


m_Name: stanina_vk
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/top.mat


m_Name: top
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/BenchDrill/materials/val.mat


m_Name: val
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/Challenge-Brick.mat


m_Name: Challenge-Brick
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/Roofing.mat


m_Name: Roofing
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/ShoreRockSand.mat


m_Name: ShoreRockSand
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/bark.mat


m_Name: bark
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/herringbone_brick_floor.mat


m_Name: herringbone_brick_floor
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/metal_aluminium_directional.mat


m_Name: metal_aluminium_directional
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/metal_brushed_copper.mat


m_Name: metal_brushed_copper
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/026_Shader_PBRscene/Substances/rocks_dirt_ground.mat


m_Name: rocks_dirt_ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_Roofing.mat


m_Name: 031_Roofing
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP
_METALLIC_SETUP _NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_Roofing_gloss.mat


m_Name: 031_Roofing_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_rocks_dirt_ground.mat


m_Name: 031_rocks_dirt_ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP
_METALLIC_SETUP _NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/031_Shader_GlossyEnvironmentSky/Materials/031_rocks_dirt_ground_gloss.mat


m_Name: 031_rocks_dirt_ground_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Hole_mesh.mat


m_Name: 032_Hole_mesh
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
_METALLIC_SETUP _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

4
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Hole_mesh_gloss.mat


m_PrefabInternal: {fileID: 0}
m_Name: 032_Hole_mesh_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHATEST_ON _GLOSSYREFLECTIONS_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
m_ShaderKeywords: _ALPHATEST_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

4
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_IndustrialGlass_gloss.mat


m_PrefabInternal: {fileID: 0}
m_Name: 032_IndustrialGlass_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _GLOSSYREFLECTIONS_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Roofing.mat


m_Name: 032_Roofing
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
_METALLIC_SETUP _NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

4
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_Roofing_gloss.mat


m_PrefabInternal: {fileID: 0}
m_Name: 032_Roofing_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _GLOSSYREFLECTIONS_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_rocks_dirt_ground.mat


m_Name: 032_rocks_dirt_ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP
_METALLIC_SETUP _NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

4
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/032_Shader_GlossyEnvironmentColor/Materials/032_rocks_dirt_ground_gloss.mat


m_PrefabInternal: {fileID: 0}
m_Name: 032_rocks_dirt_ground_gloss
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _GLOSSYREFLECTIONS_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP
_METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_ON
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_Roofing.mat


m_Name: 033_Roofing
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP _SPECULARHIGHLIGHTS_OFF
_NORMALMAP _OCCLUSIONMAP _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_Roofing_highlights.mat


m_Name: 033_Roofing_highlights
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_rocks_dirt_ground.mat


m_Name: 033_rocks_dirt_ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_SPECULARHIGHLIGHTS_OFF
_OCCLUSIONMAP _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/033_Shader_HighlightsEnvironmentGradientSH/Materials/033_rocks_dirt_ground_highlights.mat


m_Name: 033_rocks_dirt_ground_highlights
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_Roofing.mat


m_Name: 034_Roofing
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP _SPECULARHIGHLIGHTS_OFF
_NORMALMAP _OCCLUSIONMAP _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_Roofing_highlights.mat


m_Name: 034_Roofing_highlights
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _ALPHABLEND_ON _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP
_NORMALMAP
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_rocks_dirt_ground.mat


m_Name: 034_rocks_dirt_ground
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_SPECULARHIGHLIGHTS_OFF
_OCCLUSIONMAP _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

1
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/034_Shader_HighlightsEnvironmentGradientBaked/Materials/034_rocks_dirt_ground_highlights.mat


m_Name: 034_rocks_dirt_ground_highlights
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ShaderKeywords: _METALLICGLOSSMAP _METALLICSPECGLOSSMAP _METALLIC_SETUP _NORMALMAP
_OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

9
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBRDF.cginc.meta


fileFormatVersion: 2
guid: 3fabaacd5d91c384fbef81b95e495816
timeCreated: 1488965025
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

54
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightBRDF.cginc


#ifndef LIGHTWEIGHT_BRDF_INCLUDED
#define LIGHTWEIGHT_BRDF_INCLUDED
#define PI 3.14159265359f
// Based on Minimalist CookTorrance BRDF
// Implementation is slightly different from original derivation: http://www.thetenthplanet.de/archives/255
//
// * NDF [Modified] GGX
// * Modified Kelemen and Szirmay-​Kalos for Visibility term
// * Fresnel approximated with 1/LdotH
half3 LightweightBDRF(BRDFData brdfData, half roughness2, half3 normal, half3 lightDirection, half3 viewDir)
{
#ifndef _SPECULARHIGHLIGHTS_OFF
half3 halfDir = Unity_SafeNormalize(lightDirection + viewDir);
half NoH = saturate(dot(normal, halfDir));
half LoH = saturate(dot(lightDirection, halfDir));
// GGX Distribution multiplied by combined approximation of Visibility and Fresnel
// See "Optimizing PBR for Mobile" from Siggraph 2015 moving mobile graphics course
// https://community.arm.com/events/1155
half d = NoH * NoH * (roughness2 - 1.h) + 1.00001h;
half LoH2 = LoH * LoH;
half specularTerm = roughness2 / ((d * d) * max(0.1h, LoH2) * (brdfData.roughness + 0.5h) * 4);
// on mobiles (where half actually means something) denominator have risk of overflow
// clamp below was added specifically to "fix" that, but dx compiler (we convert bytecode to metal/gles)
// sees that specularTerm have only non-negative terms, so it skips max(0,..) in clamp (leaving only min(100,...))
#if defined (SHADER_API_MOBILE)
specularTerm = specularTerm - 1e-4h;
#endif
#if defined (SHADER_API_MOBILE)
specularTerm = clamp(specularTerm, 0.0, 100.0); // Prevent FP16 overflow on mobiles
#endif
half3 color = specularTerm * brdfData.specular + brdfData.diffuse;
return color;
#else
return diffColor;
#endif
}
half3 LightweightBRDFIndirect(BRDFData brdfData, UnityIndirect indirect, half roughness2, half fresnelTerm)
{
half3 c = indirect.diffuse * brdfData.diffuse;
float surfaceReduction = 1.0 / (roughness2 + 1.0);
c += surfaceReduction * indirect.specular * lerp(brdfData.specular, brdfData.grazingTerm, fresnelTerm);
return c;
}
#endif
正在加载...
取消
保存