浏览代码

Fixed broken shadergraph LW PBR shader template.

/main
Aleksandr Kirillov 7 年前
当前提交
c856eeed
共有 9 个文件被更改,包括 60 次插入30 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightPBRExtraPasses.template
  2. 18
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandard.shader
  3. 13
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardSimpleLighting.shader
  4. 22
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl
  5. 9
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl.meta
  6. 17
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaSimple.hlsl
  7. 9
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaSimple.hlsl.meta
  8. 0
      /ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaCommon.hlsl
  9. 0
      /ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaCommon.hlsl.meta

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/ShaderGraph/lightweightPBRExtraPasses.template


#pragma shader_feature _SPECGLOSSMAP
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl"
#include "LWRP/ShaderLibrary/LightweightPassMeta.hlsl"
#include "LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl"
ENDHLSL
}

18
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandard.shader


#pragma shader_feature _SPECGLOSSMAP
#include "LWRP/ShaderLibrary/InputSurfacePBR.hlsl"
#include "LWRP/ShaderLibrary/LightweightPassMeta.hlsl"
half4 LightweightFragmentMeta(MetaVertexOuput i) : SV_Target
{
SurfaceData surfaceData;
InitializeStandardLitSurfaceData(i.uv, surfaceData);
BRDFData brdfData;
InitializeBRDFData(surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.alpha, brdfData);
MetaInput o;
o.Albedo = brdfData.diffuse + brdfData.specular * brdfData.roughness * 0.5;
o.SpecularColor = surfaceData.specular;
o.Emission = surfaceData.emission;
return MetaFragment(o);
}
#include "LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl"
ENDHLSL
}

13
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardSimpleLighting.shader


#pragma shader_feature _SPECGLOSSMAP
#include "LWRP/ShaderLibrary/InputSurfaceSimple.hlsl"
#include "LWRP/ShaderLibrary/LightweightPassMeta.hlsl"
half4 LightweightFragmentMetaSimple(MetaVertexOuput i) : SV_Target
{
float2 uv = i.uv;
MetaInput o;
o.Albedo = _Color.rgb * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv).rgb;
o.SpecularColor = SpecularGloss(uv, 1.0).xyz;
o.Emission = Emission(uv);
return MetaFragment(o);
}
#include "LWRP/ShaderLibrary/LightweightPassMetaSimple.hlsl"
ENDHLSL
}

22
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl


#ifndef LIGHTWEIGHT_PASS_META_PBR_INCLUDED
#define LIGHTWEIGHT_PASS_META_PBR_INCLUDED
#include "LightweightPassMetaCommon.hlsl"
half4 LightweightFragmentMeta(MetaVertexOuput i) : SV_Target
{
SurfaceData surfaceData;
InitializeStandardLitSurfaceData(i.uv, surfaceData);
BRDFData brdfData;
InitializeBRDFData(surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.alpha, brdfData);
MetaInput o;
o.Albedo = brdfData.diffuse + brdfData.specular * brdfData.roughness * 0.5;
o.SpecularColor = surfaceData.specular;
o.Emission = surfaceData.emission;
return MetaFragment(o);
}
#endif // LIGHTWEIGHT_PASS_META_PBR_INCLUDED

9
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaPBR.hlsl.meta


fileFormatVersion: 2
guid: dcf4e762d48204e33b575f8007e3d563
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

17
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaSimple.hlsl


#ifndef LIGHTWEIGHT_PASS_META_SIMPLE_INCLUDED
#define LIGHTWEIGHT_PASS_META_SIMPLE_INCLUDED
#include "LightweightPassMetaCommon.hlsl"
half4 LightweightFragmentMetaSimple(MetaVertexOuput i) : SV_Target
{
float2 uv = i.uv;
MetaInput o;
o.Albedo = _Color.rgb * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv).rgb;
o.SpecularColor = SpecularGloss(uv, 1.0).xyz;
o.Emission = Emission(uv);
return MetaFragment(o);
}
#endif // LIGHTWEIGHT_PASS_META_SIMPLE_INCLUDED

9
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaSimple.hlsl.meta


fileFormatVersion: 2
guid: ffc632d1e38ef4682807a89afb2b966f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

/ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMeta.hlsl → /ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaCommon.hlsl

/ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMeta.hlsl.meta → /ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/LightweightPassMetaCommon.hlsl.meta

正在加载...
取消
保存