浏览代码
HDRenderLoop: Update for velociy buffer + several stuff/fix/refactor
HDRenderLoop: Update for velociy buffer + several stuff/fix/refactor
-fix issue with spotAngle that have been change in the light component - remove undesired unrachable code warning - create a proper shader config system (previous one was nor working) - Change concept of material gbuffer to also include lighting, remove all lighting buffer macro, bakeDiffuseLighting now pass to encode to gbuffer - deferred material is now in charge of all material RT format, lighting buffer included - velocity buffer is independt of deferred material - add first start of distortion - update velocity buffer management + add velocity pass -/main
Sebastien Lagarde
8 年前
当前提交
40f9dda4
共有 22 个文件被更改,包括 253 次插入 和 194 次删除
-
2Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs
-
2Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset.meta
-
96Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
-
19Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/DebugViewMaterialGBuffer.shader
-
19Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Deferred.shader
-
33Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.cs
-
5Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.cs.hlsl
-
42Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Builtin/BuiltinData.hlsl
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/LayeredLit/LayeredLitDefault.shader
-
36Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.cs
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.cs.hlsl
-
40Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.hlsl
-
3Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitData.hlsl
-
4Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitDefault.shader
-
64Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Unlit/UnlitDefault.shader
-
27Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderConfig.cs
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPassForward.hlsl
-
15Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderPass/ShaderPassGBuffer.hlsl
-
9Assets/ScriptableRenderLoop/fptl/FptlLighting.cs
-
14Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderConfig.cs.hlsl
-
9Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderConfig.cs.hlsl.meta
|
|||
fileFormatVersion: 2 |
|||
guid: 2400b74f5ce370c4481e5dc417d03703 |
|||
timeCreated: 1478744315 |
|||
timeCreated: 1478912125 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|
|||
using UnityEngine; |
|||
using UnityEngine.Rendering; |
|||
using System; |
|||
// #define DIFFUSE_LAMBERT_BRDF
|
|||
// #define USE_BSDF_PRE_LAMBDAV
|
|||
namespace UnityEngine.Experimental.ScriptableRenderLoop |
|||
{ |
|||
[GenerateHLSL(PackingRules.Exact)] |
|||
public enum ShaderOptions |
|||
{ |
|||
// TODO: Currently it is not yet possible to use this feature, we need to provide previousPositionCS to the vertex shader as part of Attribute for GBuffer pass
|
|||
// TODO: How to enable this feature only on mesh that effectively require it like skinned and moving mesh (other can be done with depth reprojection. But TAA can be an issue)
|
|||
VelocityInGBuffer = 0, // Change to 1 to enable the feature
|
|||
PackGBufferInFP16 = 0 |
|||
}; |
|||
|
|||
// Note: #define can't be use in include file in C# so we choes this way to configure both C# and hlsl
|
|||
// Changing a value in this enum Config here require to regenerate the hlsl include and recompile C# and shaders
|
|||
public class ShaderConfig |
|||
{ |
|||
public const int VelocityInGbuffer = (int)ShaderOptions.VelocityInGBuffer; |
|||
public const int PackgbufferInFP16 = (int)ShaderOptions.PackGBufferInFP16; |
|||
} |
|||
} |
|||
// Note: C# define can't be reuse in another C# file and ideally we would like that these define are present both on C# and HLSL side... How to do that ?
|
|||
// For now sync by hand within HDRenderLoop.cs file and this one
|
|||
// TODO: Currently it is not yet possible to use this feature, we need to provide previousPositionCS to the vertex shader as part of Attribute for GBuffer pass
|
|||
//#define VELOCITY_IN_GBUFFER
|
|
|||
// |
|||
// This file was automatically generated from Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderConfig.cs. Please don't edit by hand. |
|||
// |
|||
|
|||
#ifndef SHADERCONFIG_CS_HLSL |
|||
#define SHADERCONFIG_CS_HLSL |
|||
// |
|||
// UnityEngine.Experimental.ScriptableRenderLoop.ShaderOptions: static fields |
|||
// |
|||
#define SHADEROPTIONS_VELOCITY_IN_GBUFFER (0) |
|||
#define SHADEROPTIONS_PACK_GBUFFER_IN_FP16 (0) |
|||
|
|||
|
|||
#endif |
|
|||
fileFormatVersion: 2 |
|||
guid: ca6f5e7099c13ae489aa982d4af7599d |
|||
timeCreated: 1478905378 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue