浏览代码

Merge pull request #1208 from Unity-Technologies/lw/18.1-forwardport

Lw/18.1 forwardport
/main
GitHub 7 年前
当前提交
968bc78a
共有 8 个文件被更改,包括 23 次插入18 次删除
  1. 4
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/EntityLighting.hlsl
  2. 6
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Materials/Lightweight-StandardSimpleLighting.mat
  3. 1
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightBlit.shader
  4. 1
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightCopyDepth.shader
  5. 1
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightScreenSpaceShadows.shader
  6. 3
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandard.shader
  7. 7
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardSimpleLighting.shader
  8. 18
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Terrain/LightweightStandardTerrain.shader

4
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/EntityLighting.hlsl


real3 UnpackLightmapRGBM(real4 rgbmInput, real4 decodeInstructions)
{
return rgbmInput.rgb * pow(rgbmInput.a, decodeInstructions.y) * decodeInstructions.x;
return rgbmInput.rgb * PositivePow(rgbmInput.a, decodeInstructions.y) * decodeInstructions.x;
}
real3 UnpackLightmapDoubleLDR(real4 encodedColor, real4 decodeInstructions)

real alpha = max(decodeInstructions.w * (encodedIrradiance.a - 1.0) + 1.0, 0.0);
// If Linear mode is not supported we can skip exponent part
return (decodeInstructions.x * pow(alpha, decodeInstructions.y)) * encodedIrradiance.rgb;
return (decodeInstructions.x * PositivePow(alpha, decodeInstructions.y)) * encodedIrradiance.rgb;
}
real3 SampleSingleLightmap(TEXTURE2D_ARGS(lightmapTex, lightmapSampler), float2 uv, float4 transform, bool encodedLightmap, real4 decodeInstructions)

6
ScriptableRenderPipeline/LightweightPipeline/LWRP/Materials/Lightweight-StandardSimpleLighting.mat


- _Mode: 0
- _Parallax: 0.02
- _ReflectionSource: 0
- _Shininess: 0.15
- _Shininess: 0.5
- _SmoothnessTextureChannel: 0
- _SpecSource: 0
- _SpecularHighlights: 1

- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}

1
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightBlit.shader


HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma vertex Vertex
#pragma fragment Fragment

1
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightCopyDepth.shader


HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma vertex vert
#pragma fragment frag

1
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightScreenSpaceShadows.shader


HLSLINCLUDE
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
//Keep compiler quiet about Shadows.hlsl.
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/EntityLighting.hlsl"

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


// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
_Color("Color", Color) = (1,1,1,1)
_Color("Color", Color) = (0.5,0.5,0.5,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5

HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma vertex LightweightVertexMeta
#pragma fragment LightweightFragmentMeta

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


// Keep properties of StandardSpecular shader for upgrade reasons.
Properties
{
_Color("Color", Color) = (1,1,1,1)
_Color("Color", Color) = (0.5, 0.5, 0.5, 1)
_Shininess("Shininess", Range(0.01, 1.0)) = 1.0
_Shininess("Shininess", Range(0.01, 1.0)) = 0.5
_GlossMapScale("Smoothness Factor", Range(0.0, 1.0)) = 1.0
_Glossiness("Glossiness", Range(0.0, 1.0)) = 0.5

_SpecColor("Specular", Color) = (1.0, 1.0, 1.0)
_SpecColor("Specular", Color) = (0.5, 0.5, 0.5)
_SpecGlossMap("Specular", 2D) = "white" {}
[HideInInspector] _GlossinessSource("Glossiness Source", Float) = 0.0
[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0

HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma vertex LightweightVertexMeta
#pragma fragment LightweightFragmentMetaSimple

18
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Terrain/LightweightStandardTerrain.shader


{
// set by terrain engine
[HideInInspector] _Control("Control (RGBA)", 2D) = "red" {}
[HideInInspector] _Splat3("Layer 3 (A)", 2D) = "white" {}
[HideInInspector] _Splat2("Layer 2 (B)", 2D) = "white" {}
[HideInInspector] _Splat1("Layer 1 (G)", 2D) = "white" {}
[HideInInspector] _Splat0("Layer 0 (R)", 2D) = "white" {}
[HideInInspector] _Splat3("Layer 3 (A)", 2D) = "grey" {}
[HideInInspector] _Splat2("Layer 2 (B)", 2D) = "grey" {}
[HideInInspector] _Splat1("Layer 1 (G)", 2D) = "grey" {}
[HideInInspector] _Splat0("Layer 0 (R)", 2D) = "grey" {}
[HideInInspector] _Normal3("Normal 3 (A)", 2D) = "bump" {}
[HideInInspector] _Normal2("Normal 2 (B)", 2D) = "bump" {}
[HideInInspector] _Normal1("Normal 1 (G)", 2D) = "bump" {}

[HideInInspector][Gamma] _Metallic2("Metallic 2", Range(0.0, 1.0)) = 0.0
[HideInInspector][Gamma] _Metallic3("Metallic 3", Range(0.0, 1.0)) = 0.0
[HideInInspector] _Smoothness0("Smoothness 0", Range(0.0, 1.0)) = 1.0
[HideInInspector] _Smoothness1("Smoothness 1", Range(0.0, 1.0)) = 1.0
[HideInInspector] _Smoothness2("Smoothness 2", Range(0.0, 1.0)) = 1.0
[HideInInspector] _Smoothness3("Smoothness 3", Range(0.0, 1.0)) = 1.0
[HideInInspector] _Smoothness0("Smoothness 0", Range(0.0, 1.0)) = 0.5
[HideInInspector] _Smoothness1("Smoothness 1", Range(0.0, 1.0)) = 0.5
[HideInInspector] _Smoothness2("Smoothness 2", Range(0.0, 1.0)) = 0.5
[HideInInspector] _Smoothness3("Smoothness 3", Range(0.0, 1.0)) = 0.5
[HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "white" {}
[HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "grey" {}
[HideInInspector] _Color("Main Color", Color) = (1,1,1,1)
}

正在加载...
取消
保存