Skip to content

Commit 19b8bf2

Browse files
committed
- Implemented ray traced reflections for transparent objects.
- Add a new parameter to control reflections in recursive rendering - Ignoring the disable SSR flags for recursive rendering.
1 parent f47775a commit 19b8bf2

37 files changed

+1878
-55
lines changed

TestProjects/HDRP_DXR_Tests/Assets/Common/HDRenderPipelineAssetDeferred.asset

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ MonoBehaviour:
159159
m_RenderingPathDefaultCameraFrameSettings:
160160
bitDatas:
161161
data1: 65899829919581
162-
data2: 4539628425396027392
162+
data2: 4539628426469769216
163163
lodBias: 1
164164
lodBiasMode: 0
165165
lodBiasQualityLevel: 0
@@ -192,6 +192,7 @@ MonoBehaviour:
192192
m_RenderPipelineSettings:
193193
supportShadowMask: 1
194194
supportSSR: 1
195+
supportSSRTransparent: 1
195196
supportSSAO: 1
196197
supportSubsurfaceScattering: 1
197198
increaseSssSampleCount: 0
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_CorrespondingSourceObject: {fileID: 0}
8+
m_PrefabInstance: {fileID: 0}
9+
m_PrefabAsset: {fileID: 0}
10+
m_Name: M_TransparentSmooth
11+
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
12+
m_ShaderKeywords: _BLENDMODE_ALPHA _BLENDMODE_PRESERVE_SPECULAR_LIGHTING _DISABLE_SSR_TRANSPARENT
13+
_ENABLE_FOG_ON_TRANSPARENT _NORMALMAP_TANGENT_SPACE _SURFACE_TYPE_TRANSPARENT
14+
m_LightmapFlags: 4
15+
m_EnableInstancingVariants: 0
16+
m_DoubleSidedGI: 0
17+
m_CustomRenderQueue: 3000
18+
stringTagMap:
19+
RenderType: Transparent
20+
disabledShaderPasses:
21+
- DistortionVectors
22+
- MOTIONVECTORS
23+
- TransparentDepthPrepass
24+
- TransparentDepthPostpass
25+
- TransparentBackface
26+
- RayTracingPrepass
27+
m_SavedProperties:
28+
serializedVersion: 3
29+
m_TexEnvs:
30+
- _AnisotropyMap:
31+
m_Texture: {fileID: 0}
32+
m_Scale: {x: 1, y: 1}
33+
m_Offset: {x: 0, y: 0}
34+
- _BaseColorMap:
35+
m_Texture: {fileID: 0}
36+
m_Scale: {x: 1, y: 1}
37+
m_Offset: {x: 0, y: 0}
38+
- _BentNormalMap:
39+
m_Texture: {fileID: 0}
40+
m_Scale: {x: 1, y: 1}
41+
m_Offset: {x: 0, y: 0}
42+
- _BentNormalMapOS:
43+
m_Texture: {fileID: 0}
44+
m_Scale: {x: 1, y: 1}
45+
m_Offset: {x: 0, y: 0}
46+
- _CoatMaskMap:
47+
m_Texture: {fileID: 0}
48+
m_Scale: {x: 1, y: 1}
49+
m_Offset: {x: 0, y: 0}
50+
- _DetailMap:
51+
m_Texture: {fileID: 0}
52+
m_Scale: {x: 1, y: 1}
53+
m_Offset: {x: 0, y: 0}
54+
- _DistortionVectorMap:
55+
m_Texture: {fileID: 0}
56+
m_Scale: {x: 1, y: 1}
57+
m_Offset: {x: 0, y: 0}
58+
- _EmissiveColorMap:
59+
m_Texture: {fileID: 0}
60+
m_Scale: {x: 1, y: 1}
61+
m_Offset: {x: 0, y: 0}
62+
- _HeightMap:
63+
m_Texture: {fileID: 0}
64+
m_Scale: {x: 1, y: 1}
65+
m_Offset: {x: 0, y: 0}
66+
- _IridescenceMaskMap:
67+
m_Texture: {fileID: 0}
68+
m_Scale: {x: 1, y: 1}
69+
m_Offset: {x: 0, y: 0}
70+
- _IridescenceThicknessMap:
71+
m_Texture: {fileID: 0}
72+
m_Scale: {x: 1, y: 1}
73+
m_Offset: {x: 0, y: 0}
74+
- _MainTex:
75+
m_Texture: {fileID: 0}
76+
m_Scale: {x: 1, y: 1}
77+
m_Offset: {x: 0, y: 0}
78+
- _MaskMap:
79+
m_Texture: {fileID: 0}
80+
m_Scale: {x: 1, y: 1}
81+
m_Offset: {x: 0, y: 0}
82+
- _NormalMap:
83+
m_Texture: {fileID: 0}
84+
m_Scale: {x: 1, y: 1}
85+
m_Offset: {x: 0, y: 0}
86+
- _NormalMapOS:
87+
m_Texture: {fileID: 0}
88+
m_Scale: {x: 1, y: 1}
89+
m_Offset: {x: 0, y: 0}
90+
- _SpecularColorMap:
91+
m_Texture: {fileID: 0}
92+
m_Scale: {x: 1, y: 1}
93+
m_Offset: {x: 0, y: 0}
94+
- _SubsurfaceMaskMap:
95+
m_Texture: {fileID: 0}
96+
m_Scale: {x: 1, y: 1}
97+
m_Offset: {x: 0, y: 0}
98+
- _TangentMap:
99+
m_Texture: {fileID: 0}
100+
m_Scale: {x: 1, y: 1}
101+
m_Offset: {x: 0, y: 0}
102+
- _TangentMapOS:
103+
m_Texture: {fileID: 0}
104+
m_Scale: {x: 1, y: 1}
105+
m_Offset: {x: 0, y: 0}
106+
- _ThicknessMap:
107+
m_Texture: {fileID: 0}
108+
m_Scale: {x: 1, y: 1}
109+
m_Offset: {x: 0, y: 0}
110+
- _TransmittanceColorMap:
111+
m_Texture: {fileID: 0}
112+
m_Scale: {x: 1, y: 1}
113+
m_Offset: {x: 0, y: 0}
114+
m_Floats:
115+
- _AORemapMax: 1
116+
- _AORemapMin: 0
117+
- _ATDistance: 1
118+
- _AddPrecomputedVelocity: 0
119+
- _AlbedoAffectEmissive: 0
120+
- _AlphaCutoff: 0.5
121+
- _AlphaCutoffEnable: 0
122+
- _AlphaCutoffPostpass: 0.5
123+
- _AlphaCutoffPrepass: 0.5
124+
- _AlphaCutoffShadow: 0.5
125+
- _AlphaDstBlend: 10
126+
- _AlphaSrcBlend: 1
127+
- _Anisotropy: 0
128+
- _BlendMode: 0
129+
- _CoatMask: 0
130+
- _CullMode: 2
131+
- _CullModeForward: 2
132+
- _Cutoff: 0.5
133+
- _DepthOffsetEnable: 0
134+
- _DetailAlbedoScale: 1
135+
- _DetailNormalScale: 1
136+
- _DetailSmoothnessScale: 1
137+
- _DiffusionProfile: 0
138+
- _DiffusionProfileHash: 0
139+
- _DisplacementLockObjectScale: 1
140+
- _DisplacementLockTilingScale: 1
141+
- _DisplacementMode: 0
142+
- _DistortionBlendMode: 0
143+
- _DistortionBlurBlendMode: 0
144+
- _DistortionBlurDstBlend: 1
145+
- _DistortionBlurRemapMax: 1
146+
- _DistortionBlurRemapMin: 0
147+
- _DistortionBlurScale: 1
148+
- _DistortionBlurSrcBlend: 1
149+
- _DistortionDepthTest: 1
150+
- _DistortionDstBlend: 1
151+
- _DistortionEnable: 0
152+
- _DistortionScale: 1
153+
- _DistortionSrcBlend: 1
154+
- _DistortionVectorBias: -1
155+
- _DistortionVectorScale: 2
156+
- _DoubleSidedEnable: 0
157+
- _DoubleSidedNormalMode: 1
158+
- _DstBlend: 10
159+
- _EmissiveColorMode: 1
160+
- _EmissiveExposureWeight: 1
161+
- _EmissiveIntensity: 1
162+
- _EmissiveIntensityUnit: 0
163+
- _EnableBlendModePreserveSpecularLighting: 1
164+
- _EnableFogOnTransparent: 1
165+
- _EnableGeometricSpecularAA: 0
166+
- _EnergyConservingSpecularColor: 1
167+
- _HeightAmplitude: 0.02
168+
- _HeightCenter: 0.5
169+
- _HeightMapParametrization: 0
170+
- _HeightMax: 1
171+
- _HeightMin: -1
172+
- _HeightOffset: 0
173+
- _HeightPoMAmplitude: 2
174+
- _HeightTessAmplitude: 2
175+
- _HeightTessCenter: 0.5
176+
- _InvTilingScale: 1
177+
- _Ior: 1.5
178+
- _IridescenceMask: 1
179+
- _IridescenceThickness: 1
180+
- _LinkDetailsWithBase: 1
181+
- _MaterialID: 1
182+
- _Metallic: 1
183+
- _NormalMapSpace: 0
184+
- _NormalScale: 1
185+
- _PPDLodThreshold: 5
186+
- _PPDMaxSamples: 15
187+
- _PPDMinSamples: 5
188+
- _PPDPrimitiveLength: 1
189+
- _PPDPrimitiveWidth: 1
190+
- _RayTracing: 0
191+
- _ReceivesSSR: 1
192+
- _ReceivesSSRTransparent: 0
193+
- _RefractionModel: 0
194+
- _SSRefractionProjectionModel: 0
195+
- _Smoothness: 1
196+
- _SmoothnessRemapMax: 1
197+
- _SmoothnessRemapMin: 0
198+
- _SpecularAAScreenSpaceVariance: 0.1
199+
- _SpecularAAThreshold: 0.2
200+
- _SpecularOcclusionMode: 1
201+
- _SrcBlend: 1
202+
- _StencilRef: 0
203+
- _StencilRefDepth: 0
204+
- _StencilRefDistortionVec: 4
205+
- _StencilRefGBuffer: 2
206+
- _StencilRefMV: 32
207+
- _StencilWriteMask: 6
208+
- _StencilWriteMaskDepth: 8
209+
- _StencilWriteMaskDistortionVec: 4
210+
- _StencilWriteMaskGBuffer: 14
211+
- _StencilWriteMaskMV: 40
212+
- _SubsurfaceMask: 1
213+
- _SupportDecals: 1
214+
- _SurfaceType: 1
215+
- _TexWorldScale: 1
216+
- _TexWorldScaleEmissive: 1
217+
- _Thickness: 1
218+
- _TransmissionEnable: 1
219+
- _TransparentBackfaceEnable: 0
220+
- _TransparentCullMode: 2
221+
- _TransparentDepthPostpassEnable: 0
222+
- _TransparentDepthPrepassEnable: 0
223+
- _TransparentSortPriority: 0
224+
- _TransparentWritingMotionVec: 0
225+
- _TransparentZWrite: 0
226+
- _UVBase: 0
227+
- _UVDetail: 0
228+
- _UVEmissive: 0
229+
- _UseEmissiveIntensity: 0
230+
- _UseShadowThreshold: 0
231+
- _ZTestDepthEqualForOpaque: 4
232+
- _ZTestGBuffer: 4
233+
- _ZTestModeDistortion: 4
234+
- _ZTestTransparent: 4
235+
- _ZWrite: 0
236+
m_Colors:
237+
- _BaseColor: {r: 1, g: 0.5, b: 0.5, a: 1}
238+
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
239+
- _Color: {r: 1, g: 0.5, b: 0.5, a: 1}
240+
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
241+
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
242+
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
243+
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
244+
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
245+
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
246+
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
247+
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
248+
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
249+
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
250+
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
251+
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
252+
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
253+
m_BuildTextureStacks: []
254+
--- !u!114 &8809720483700552834
255+
MonoBehaviour:
256+
m_ObjectHideFlags: 11
257+
m_CorrespondingSourceObject: {fileID: 0}
258+
m_PrefabInstance: {fileID: 0}
259+
m_PrefabAsset: {fileID: 0}
260+
m_GameObject: {fileID: 0}
261+
m_Enabled: 1
262+
m_EditorHideFlags: 0
263+
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
264+
m_Name:
265+
m_EditorClassIdentifier:
266+
version: 3

TestProjects/HDRP_DXR_Tests/Assets/Scenes/RayTracedReflectionsData/M_TransparentSmooth.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)