浏览代码

HDRenderPipeline: More rename of UnityEditor.Experimental.ScriptableRenderLoop + minor stuff

/main
sebastienlagarde 8 年前
当前提交
6521b4be
共有 19 个文件被更改,包括 72 次插入31 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
  2. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs
  3. 13
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader
  4. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
  5. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/LitUI.cs
  6. 13
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.shader
  7. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitSharePass.hlsl
  8. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs
  9. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Editor/UnlitUI.cs
  10. 10
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Unlit.shader
  11. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/UnlitSharePass.hlsl
  12. 15
      Assets/ScriptableRenderLoop/ShaderLibrary/CommonMaterial.hlsl
  13. 9
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation.meta
  14. 0
      Assets/ScriptableRenderLoop/ShaderLibrary/Tesselation.hlsl
  15. 9
      Assets/ScriptableRenderLoop/ShaderLibrary/Tesselation.hlsl.meta
  16. 9
      Assets/TestScenes/HDTest/HDRI.meta
  17. 0
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation/ShareTesselation.hlsl
  18. 9
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation/ShareTesselation.hlsl.meta

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs


using UnityEngine.Experimental.Rendering.HDPipeline;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public class HDRenderPipelineMenuItems
{

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs


using System.Linq;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
internal class LayeredLitGUI : LitGUI
{

13
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/LayeredLit/LayeredLit.shader


#include "Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitProperties.hlsl"
// All our shaders use same name for entry point
#pragma vertex Vert
#pragma fragment Frag
ENDHLSL
SubShader

HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_GBUFFER
#include "../../Material/Material.hlsl"

Cull[_CullMode]
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_DEBUG_VIEW_MATERIAL

Cull[_CullMode]
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_FORWARD
// TEMP until pragma work in include

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs


using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public abstract class BaseLitGUI : ShaderGUI
{

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Editor/LitUI.cs


using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
class LitGUI : BaseLitGUI
{

13
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.shader


#include "Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitProperties.hlsl"
// All our shaders use same name for entry point
#pragma vertex Vert
#pragma fragment Frag
ENDHLSL
SubShader

HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_GBUFFER
#include "../../Material/Material.hlsl"
#include "LitData.hlsl"

Cull[_CullMode]
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_DEBUG_VIEW_MATERIAL
#include "../../Material/Material.hlsl"

HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_FORWARD
// TEMP until pragma work in include

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/LitSharePass.hlsl


//-------------------------------------------------------------------------------------
// TODO: Here we will also have all the vertex deformation (GPU skinning, vertex animation, morph target...) or we will need to generate a compute shaders instead (better! but require work to deal with unpacking like fp16)
PackedVaryings VertDefault(Attributes input)
PackedVaryings Vert(Attributes input)
{
Varyings output;

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Editor/BaseUnlitUI.cs


using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public abstract class BaseUnlitGUI : ShaderGUI
{

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Editor/UnlitUI.cs


using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.ScriptableRenderLoop
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
class UnlitGUI : BaseUnlitGUI
{

10
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/Unlit.shader


float _AlphaCutoff;
// All our shaders use same name for entry point
#pragma vertex Vert
#pragma fragment Frag
ENDHLSL
SubShader

Cull[_CullMode]
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_DEBUG_VIEW_MATERIAL
#include "../../Material/Material.hlsl"

Cull [_CullMode]
HLSLPROGRAM
#pragma vertex VertDefault
#pragma fragment Frag
#define SHADERPASS SHADERPASS_FORWARD_UNLIT
#include "../../Material/Material.hlsl"

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Unlit/UnlitSharePass.hlsl


// Vertex shader
//-------------------------------------------------------------------------------------
PackedVaryings VertDefault(Attributes input)
PackedVaryings Vert(Attributes input)
{
Varyings output;

15
Assets/ScriptableRenderLoop/ShaderLibrary/CommonMaterial.hlsl


return viewDirTS.xy * height;
}
// ref https://www.gamedev.net/topic/678043-how-to-blend-world-space-normals/#entry5287707
// assume compositing in world space
// Note: Using vtxNormal = float3(0, 0, 1) give the BlendNormalRNM formulation.
// TODO: Untested
float3 BlendNormalWorldspaceRNM(float3 n1, float3 n2, float3 vtxNormal)
{
// Build the shortest-arc quaternion
float4 q = float4(cross(vtxNormal, n2), dot(vtxNormal, n2) + 1.0) / sqrt(2.0 * (dot(vtxNormal, n2) + 1));
// Rotate the normal
return n1 * (q.w * q.w - dot(q.xyz, q.xyz)) + 2 * q.xyz * dot(q.xyz, n1) + 2 * q.w * cross(q.xyz, n1);
}
// assume compositing in tangent space
float3 BlendNormalRNM(float3 n1, float3 n2)
{
float3 t = n1.xyz + float3(0.0, 0.0, 1.0);

}
// assume compositing in tangent space
float3 BlendNormal(float3 n1, float3 n2)
{
return normalize(float3(n1.xy * n2.z + n2.xy * n1.z, n1.z * n2.z));

9
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation.meta


fileFormatVersion: 2
guid: 9582236b174d65b4391e0f9890fd2194
folderAsset: yes
timeCreated: 1483692743
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/ScriptableRenderLoop/ShaderLibrary/Tesselation.hlsl

9
Assets/ScriptableRenderLoop/ShaderLibrary/Tesselation.hlsl.meta


fileFormatVersion: 2
guid: 1ea56bc9911bbad4191075872a46cc89
timeCreated: 1483692743
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

9
Assets/TestScenes/HDTest/HDRI.meta


fileFormatVersion: 2
guid: 373746a83365c134fa16fcc2208ff40b
folderAsset: yes
timeCreated: 1483546471
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

0
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation/ShareTesselation.hlsl

9
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Tesselation/ShareTesselation.hlsl.meta


fileFormatVersion: 2
guid: 70a7ee6a44b86494daad0acd691e1d51
timeCreated: 1483692743
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存