比较提交
合并到: unity-tech-cn:main
unity-tech-cn:/main
unity-tech-cn:/scriptablerenderloop-materialgraph
unity-tech-cn:/batch_rendering
unity-tech-cn:/vr_sandbox
unity-tech-cn:/Branch_Batching2
unity-tech-cn:/mikko-renderpass
unity-tech-cn:/fptl_cleanup
unity-tech-cn:/vr_fptl_sandbox
unity-tech-cn:/Branch_batcher
unity-tech-cn:/MobileDeferredRenderPass
unity-tech-cn:/vr_api_testbed
unity-tech-cn:/RenderPassXR_Sandbox
unity-tech-cn:/classicDeferredMobile
unity-tech-cn:/EnableVulkanAndES3
unity-tech-cn:/OnTileRenderPass2
unity-tech-cn:/sample_game
unity-tech-cn:/culling
unity-tech-cn:/OTDRP-develop
unity-tech-cn:/Add-support-for-light-specular-color-tint
unity-tech-cn:/stochastic_alpha_test
unity-tech-cn:/Yibing-Project-2
unity-tech-cn:/xr-hdrp-rt-test
unity-tech-cn:/system-shock-transitional-shader
unity-tech-cn:/feature-runtimeTextureCache
unity-tech-cn:/shader-library-include-paths
unity-tech-cn:/asmdef
unity-tech-cn:/namespace
unity-tech-cn:/feature-ReflectionProbeFit
unity-tech-cn:/prototype-decals
unity-tech-cn:/DrawSettings
unity-tech-cn:/projects-TheLastStand
unity-tech-cn:/iridesence
unity-tech-cn:/lw-nolightlist
unity-tech-cn:/Add-physical-light-unity-support
unity-tech-cn:/LightweightPipelineExperimental
unity-tech-cn:/switch_support
unity-tech-cn:/feature-ScreenSpaceProjection
unity-tech-cn:/use-roughness
unity-tech-cn:/LW-BakedIndirect
unity-tech-cn:/Branch_FixObjectMotion
unity-tech-cn:/srp_batcher
unity-tech-cn:/LW-LightOptimizations
unity-tech-cn:/Branch_ScriptableCulling
unity-tech-cn:/LW-LowEnd
unity-tech-cn:/feature-ReflectionProbeBaking
unity-tech-cn:/Improve-shader-generator
unity-tech-cn:/improve-shader-generator-data
unity-tech-cn:/2018.1
unity-tech-cn:/lwr-xr-shader-fixes-sandbox
unity-tech-cn:/uifoldout-fix
unity-tech-cn:/lw-callbacktests
unity-tech-cn:/lwrp-xr-sssm-DrawProc
unity-tech-cn:/lwrp-xr-tim-hacks
unity-tech-cn:/ss3HDRP
unity-tech-cn:/build-automation
unity-tech-cn:/HDRP_SurfaceShader
unity-tech-cn:/tag-1.1.0-beta
unity-tech-cn:/xr-hdrp-pyramids
unity-tech-cn:/lw-bias_per_cascade
unity-tech-cn:/040SimpleLighting
unity-tech-cn:/lw-tangentspacelightingtest
unity-tech-cn:/Lux-for-HDRI
unity-tech-cn:/HDRP_GraphicTests
unity-tech-cn:/projects-system-shock-2018.1
unity-tech-cn:/Change-cluster-Tile-to-dynamic-branch
unity-tech-cn:/Reduce-shader-variant
unity-tech-cn:/lw-shadow-optimization
unity-tech-cn:/LW-DistortionPass
unity-tech-cn:/lw-shader-optimization
unity-tech-cn:/Branch_RemoveCascadeBordersInUI
unity-tech-cn:/Branch_EnableLastSplitFade
unity-tech-cn:/Branch_DebugExposure
unity-tech-cn:/Documentation
unity-tech-cn:/lw-bugfixes
unity-tech-cn:/Branch_DebugExposure2
unity-tech-cn:/Branch_DebugWindowFix
unity-tech-cn:/lw-shadow-keyword
unity-tech-cn:/backport-shader-optimization
unity-tech-cn:/tag-1.1.4-preview
unity-tech-cn:/StackLitWork
unity-tech-cn:/tag-1.1.5-preview
unity-tech-cn:/tag-1.1.6-preview
unity-tech-cn:/stacklit
unity-tech-cn:/StackLit2
unity-tech-cn:/hdrp-staging
拉取从: unity-tech-cn:hdrp-staging
unity-tech-cn:/main
unity-tech-cn:/scriptablerenderloop-materialgraph
unity-tech-cn:/batch_rendering
unity-tech-cn:/vr_sandbox
unity-tech-cn:/Branch_Batching2
unity-tech-cn:/mikko-renderpass
unity-tech-cn:/fptl_cleanup
unity-tech-cn:/vr_fptl_sandbox
unity-tech-cn:/Branch_batcher
unity-tech-cn:/MobileDeferredRenderPass
unity-tech-cn:/vr_api_testbed
unity-tech-cn:/RenderPassXR_Sandbox
unity-tech-cn:/classicDeferredMobile
unity-tech-cn:/EnableVulkanAndES3
unity-tech-cn:/OnTileRenderPass2
unity-tech-cn:/sample_game
unity-tech-cn:/culling
unity-tech-cn:/OTDRP-develop
unity-tech-cn:/Add-support-for-light-specular-color-tint
unity-tech-cn:/stochastic_alpha_test
unity-tech-cn:/Yibing-Project-2
unity-tech-cn:/xr-hdrp-rt-test
unity-tech-cn:/system-shock-transitional-shader
unity-tech-cn:/feature-runtimeTextureCache
unity-tech-cn:/shader-library-include-paths
unity-tech-cn:/asmdef
unity-tech-cn:/namespace
unity-tech-cn:/feature-ReflectionProbeFit
unity-tech-cn:/prototype-decals
unity-tech-cn:/DrawSettings
unity-tech-cn:/projects-TheLastStand
unity-tech-cn:/iridesence
unity-tech-cn:/lw-nolightlist
unity-tech-cn:/Add-physical-light-unity-support
unity-tech-cn:/LightweightPipelineExperimental
unity-tech-cn:/switch_support
unity-tech-cn:/feature-ScreenSpaceProjection
unity-tech-cn:/use-roughness
unity-tech-cn:/LW-BakedIndirect
unity-tech-cn:/Branch_FixObjectMotion
unity-tech-cn:/srp_batcher
unity-tech-cn:/LW-LightOptimizations
unity-tech-cn:/Branch_ScriptableCulling
unity-tech-cn:/LW-LowEnd
unity-tech-cn:/feature-ReflectionProbeBaking
unity-tech-cn:/Improve-shader-generator
unity-tech-cn:/improve-shader-generator-data
unity-tech-cn:/2018.1
unity-tech-cn:/lwr-xr-shader-fixes-sandbox
unity-tech-cn:/uifoldout-fix
unity-tech-cn:/lw-callbacktests
unity-tech-cn:/lwrp-xr-sssm-DrawProc
unity-tech-cn:/lwrp-xr-tim-hacks
unity-tech-cn:/ss3HDRP
unity-tech-cn:/build-automation
unity-tech-cn:/HDRP_SurfaceShader
unity-tech-cn:/tag-1.1.0-beta
unity-tech-cn:/xr-hdrp-pyramids
unity-tech-cn:/lw-bias_per_cascade
unity-tech-cn:/040SimpleLighting
unity-tech-cn:/lw-tangentspacelightingtest
unity-tech-cn:/Lux-for-HDRI
unity-tech-cn:/HDRP_GraphicTests
unity-tech-cn:/projects-system-shock-2018.1
unity-tech-cn:/Change-cluster-Tile-to-dynamic-branch
unity-tech-cn:/Reduce-shader-variant
unity-tech-cn:/lw-shadow-optimization
unity-tech-cn:/LW-DistortionPass
unity-tech-cn:/lw-shader-optimization
unity-tech-cn:/Branch_RemoveCascadeBordersInUI
unity-tech-cn:/Branch_EnableLastSplitFade
unity-tech-cn:/Branch_DebugExposure
unity-tech-cn:/Documentation
unity-tech-cn:/lw-bugfixes
unity-tech-cn:/Branch_DebugExposure2
unity-tech-cn:/Branch_DebugWindowFix
unity-tech-cn:/lw-shadow-keyword
unity-tech-cn:/backport-shader-optimization
unity-tech-cn:/tag-1.1.4-preview
unity-tech-cn:/StackLitWork
unity-tech-cn:/tag-1.1.5-preview
unity-tech-cn:/tag-1.1.6-preview
unity-tech-cn:/stacklit
unity-tech-cn:/StackLit2
unity-tech-cn:/hdrp-staging
此合并请求有变更与目标分支冲突。
/com.unity.render-pipelines.high-definition/HDRP/Debug/DebugLightVolume.shader
/com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
/com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalProjectorComponentEditor.cs
/com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
/com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
/com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalProjectorComponent.cs
/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDCustomSamplerId.cs
/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
/com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDStringConstants.cs
/com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/HDRenderPipelineResources.asset
/com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/RenderPipelineResources.cs
/com.unity.render-pipelines.high-definition/CHANGELOG.md
31 次代码提交
main
...
hdrp-staging
共有 47 个文件被更改,包括 1127 次插入 和 348 次删除
-
341com.unity.render-pipelines.core/CoreRP/Editor/Lighting/CoreLightEditorUtilities.cs
-
11com.unity.render-pipelines.high-definition/CHANGELOG.md
-
6com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/RenderPipelineResources.cs
-
3com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/HDRenderPipelineResources.asset
-
7com.unity.render-pipelines.high-definition/HDRP/Debug/DebugLightVolume.shader
-
5com.unity.render-pipelines.high-definition/HDRP/Material/RenderPipelineMaterial.cs
-
7com.unity.render-pipelines.high-definition/HDRP/Material/GBufferManager.cs
-
10com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader
-
5com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLitData.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.cs
-
8com.unity.render-pipelines.high-definition/HDRP/Material/Fabric/Fabric.hlsl
-
2com.unity.render-pipelines.high-definition/HDRP/Material/Fabric/Fabric.shader
-
7com.unity.render-pipelines.high-definition/HDRP/Material/Fabric/FabricData.hlsl
-
3com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalProjectorComponent.cs
-
8com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalUtilities.hlsl
-
150com.unity.render-pipelines.high-definition/HDRP/Material/Decal/Decal.shader
-
49com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Material/NormalBufferManager.cs
-
6com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute
-
1com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalProjectorComponentEditor.cs
-
7com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalUI.cs
-
6com.unity.render-pipelines.high-definition/HDRP/Editor/Material/StackLit/StackLitUI.cs
-
18com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Gizmos.cs
-
12com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Preview.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.ContextualMenu.cs.meta
-
52com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Volumetric/DensityVolumeEditor.cs
-
66com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDAdditionalLightDataEditor.cs
-
126com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
-
78com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/InfluenceVolume.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/VolumetricFog.cs
-
72com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/DensityVolume.cs
-
41com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.cs.hlsl
-
43com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeVoxelization.compute
-
24com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.compute
-
74com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.cs
-
1com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDCustomSamplerId.cs
-
45com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
-
9com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDStringConstants.cs
-
9com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalNormalBuffer.shader.meta
-
89com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalNormalBuffer.shader
-
34com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditorUtilities.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditorUtilities.cs.meta
|
|||
fileFormatVersion: 2 |
|||
guid: fd532bf1795188c4daaa66ea798b8b0a |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Hidden/HDRenderPipeline/Material/Decal/DecalNormalBuffer" |
|||
{ |
|||
|
|||
Properties |
|||
{ |
|||
// Stencil state |
|||
[HideInInspector] _DecalNormalBufferStencilRef("_DecalNormalBufferStencilRef", Int) = 0 // set at runtime |
|||
[HideInInspector] _DecalNormalBufferStencilReadMask("_DecalNormalBufferStencilReadMask", Int) = 0 // set at runtime |
|||
} |
|||
|
|||
HLSLINCLUDE |
|||
|
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch |
|||
#include "CoreRP/ShaderLibrary/Common.hlsl" |
|||
#include "../../ShaderVariables.hlsl" |
|||
#include "Decal.hlsl" |
|||
#include "../NormalBuffer.hlsl" |
|||
|
|||
RW_TEXTURE2D(float4, _NormalBuffer); |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
DECLARE_DBUFFER_TEXTURE(_DBufferTexture); |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
output.texcoord = GetFullScreenTriangleTexCoord(input.vertexID); |
|||
return output; |
|||
} |
|||
|
|||
// Force the stencil test before the UAV write. |
|||
[earlydepthstencil] |
|||
float4 FragNearest(Varyings input) : SV_Target |
|||
{ |
|||
FETCH_DBUFFER(DBuffer, _DBufferTexture, input.texcoord * _ScreenSize.xy); |
|||
DecalSurfaceData decalSurfaceData; |
|||
DECODE_FROM_DBUFFER(DBuffer, decalSurfaceData); |
|||
|
|||
float4 GBufferNormal = _NormalBuffer[input.texcoord * _ScreenSize.xy]; |
|||
NormalData normalData; |
|||
DecodeFromNormalBuffer(GBufferNormal, uint2(0, 0), normalData); |
|||
normalData.normalWS.xyz = normalize(normalData.normalWS.xyz * decalSurfaceData.normalWS.w + decalSurfaceData.normalWS.xyz); |
|||
EncodeIntoNormalBuffer(normalData, uint2(0, 0), GBufferNormal); |
|||
_NormalBuffer[input.texcoord * _ScreenSize.xy] = GBufferNormal; |
|||
return float4(0, 0, 0, 0); // normal buffer is written into as a RWTexture |
|||
} |
|||
|
|||
ENDHLSL |
|||
|
|||
SubShader |
|||
{ |
|||
Tags{ "RenderPipeline" = "HDRenderPipeline" } |
|||
|
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
ZTest Always |
|||
Blend Off |
|||
Cull Off |
|||
|
|||
Stencil |
|||
{ |
|||
ReadMask[_DecalNormalBufferStencilReadMask] |
|||
Ref[_DecalNormalBufferStencilRef] |
|||
Comp Equal |
|||
Pass Zero // doesn't really matter, but clear to 0 for debugging |
|||
} |
|||
|
|||
HLSLPROGRAM |
|||
#pragma vertex Vert |
|||
#pragma fragment FragNearest |
|||
ENDHLSL |
|||
} |
|||
} |
|||
|
|||
Fallback Off |
|||
} |
|
|||
using System; |
|||
using System.Reflection; |
|||
using UnityEditor; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public static class HDLightEditorUtilities |
|||
{ |
|||
public static void DrawFrustumlightGizmo(Light frustumlight) |
|||
{ |
|||
var additionalLightData = frustumlight.GetComponent<HDAdditionalLightData>(); |
|||
if (additionalLightData == null) |
|||
return; |
|||
|
|||
Matrix4x4 matrix = new Matrix4x4(frustumlight.transform.right, frustumlight.transform.up, frustumlight.transform.forward, frustumlight.transform.position); |
|||
Gizmos.matrix = matrix; |
|||
if (additionalLightData.spotLightShape == SpotLightShape.Pyramid) |
|||
{ |
|||
CoreLightEditorUtilities.DrawLightPyramidFrustum(Vector3.zero, frustumlight.spotAngle, frustumlight.range, 0.0f, additionalLightData.aspectRatio); |
|||
} |
|||
else // Ortho frustum
|
|||
{ |
|||
//DrawLightOrthoFrustum(Vector3.zero, additionalLightData.shapeWidth, additionalLightData.shapeHeight, frustumlight.range, 0.0f);
|
|||
|
|||
Vector3 frustumCenter = new Vector3(0.0f, 0.0f, 0.5f * frustumlight.range); |
|||
Vector3 frustumsize = new Vector3(additionalLightData.shapeWidth, additionalLightData.shapeHeight, frustumlight.range); |
|||
Gizmos.DrawWireCube(frustumCenter, frustumsize); |
|||
} |
|||
Gizmos.matrix = Matrix4x4.identity; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ef4691ff5d1cc1f4c9d444b14135a45d |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue