Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDRP][Path Tracing] Replaced recursive continuation rays with loop in ray generation #7090

Closed
wants to merge 50 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b1ed6a4
Moved path tracing forward integrator to its own file.
eturquin Jan 25, 2022
e3f7aa8
Moved files for better consistency.
eturquin Jan 25, 2022
19fb5d9
Ray generation refactor.
eturquin Jan 25, 2022
5911aac
WIP
eturquin Jan 26, 2022
75bfb46
WIP
eturquin Feb 1, 2022
7ea3411
WIP
eturquin Feb 3, 2022
ffcb7c2
Mult by throughput on misses.
eturquin Feb 6, 2022
ffaf44d
WIP
eturquin Feb 6, 2022
9d3ae2a
WIP
eturquin Feb 7, 2022
a4dc385
Reached mostly functional state (still needs to reactivate volumes).
eturquin Feb 7, 2022
a067e31
Moved intensity clamping to raygen.
eturquin Feb 8, 2022
66dbf21
Reproduced former clamping scheme.
eturquin Feb 8, 2022
34f5d37
Removed sensor files.
eturquin Feb 8, 2022
708871e
More comments on Segment ID.
eturquin Feb 8, 2022
a6d81eb
Cleaned up PathIntersection aliasing.
eturquin Feb 8, 2022
86f2d83
Reactivated unlit shadow matte.
eturquin Feb 8, 2022
d216264
Added support for transparent Unlit continuation ray.
eturquin Feb 8, 2022
554d5ed
Adding volumes back (WIP)
eturquin Feb 8, 2022
49260fb
Fixed volume absorption and scattering.
eturquin Feb 8, 2022
f576a88
Minor code refactor for fog absorption.
eturquin Feb 8, 2022
5b956b0
Replaced *intersection variable names with payload.
eturquin Feb 8, 2022
7cc5149
Renamed PathIntersection to PathPayload.
eturquin Feb 8, 2022
5a7a244
Fixed bug with continuation rays hitting transparent surfaces.
eturquin Feb 8, 2022
bbb7375
Rework of the Miss system, support for non-sampled skies.
eturquin Feb 9, 2022
a8176bc
Simplified clamping.
eturquin Feb 9, 2022
f204ac8
Fixed fog absorption on sky values.
eturquin Feb 9, 2022
37c742a
Trying more aggressive clamping (will need to be further tested).
eturquin Feb 9, 2022
8be7544
Fixed with continuation ray init.
eturquin Feb 10, 2022
5f383b0
Removed clamping on throughput (was too strong).
eturquin Feb 10, 2022
ed20eb8
Merge branch 'master' into hd/pt_no_recursion
eturquin Feb 10, 2022
1e64195
...
eturquin Feb 10, 2022
8bd1493
Reached working state (still things to be double-checked)
eturquin Feb 10, 2022
c60a32c
Fixed issue with segmentID aliasing.
eturquin Feb 10, 2022
a11d407
Get AOV data straight form BSDF data.
eturquin Feb 10, 2022
13f692f
Fixed motion vector computation in AOV of the same name.
eturquin Feb 11, 2022
4a6772f
Merge branch 'master' into hd/pt_no_recursion
eturquin Feb 11, 2022
9b4c94a
Updated changelog.
eturquin Feb 11, 2022
95656d0
Updated reference images.
eturquin Feb 11, 2022
9564749
Merge branch 'master' into hd/pt_no_recursion
eturquin Feb 21, 2022
c638223
remove RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH Flag
remi-chapelain Feb 21, 2022
ff4d00b
Cleaned up corner cases with bad init and payload aliasing.
eturquin Feb 21, 2022
c4eda27
Set right payload instance for shadow computation on volumetric
eturquin Feb 22, 2022
770f28c
Simplified anyhit().
eturquin Feb 22, 2022
5fa4107
Skip closestHit as much as possible.
eturquin Feb 22, 2022
7ffbe6c
Cosmetic.
eturquin Feb 22, 2022
82e3d8e
Added roughness-based intensity clamp.
eturquin Feb 23, 2022
0cf403c
Reverted to previous clamping method.
eturquin Feb 23, 2022
13a42df
Merge branch 'master' into hd/pt_no_recursion
eturquin Feb 23, 2022
5a6e362
Merge branch 'master' into hd/pt_no_recursion
eturquin Feb 28, 2022
5cb5a89
Merge branch 'master' into hd/pt_no_recursion
eturquin Mar 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed motion vector computation in AOV of the same name.
  • Loading branch information
eturquin committed Feb 11, 2022
commit 13f692f7728e9167639091c23bdbc3d35e18ddc8
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ void WriteAOVData(AOVData aovData, float3 positionWS, inout PathPayload payload)
return;

// Compute motion vector (from pixel coordinates and world position passed as inputs)
float3 prevPosWS = mul(unity_MatrixPreviousM, float4(positionWS, 1.0)).xyz;
float3 positionOS = TransformWorldToObject(positionWS);
float3 prevPosWS = mul(GetPrevObjectToWorldMatrix(), float4(positionOS, 1.0)).xyz;
float4 prevClipPos = mul(UNITY_MATRIX_PREV_VP, prevPosWS);
prevClipPos.xy /= prevClipPos.w;
prevClipPos.y = -prevClipPos.y;
float2 viewportSize = _ScreenSize.xy *_RTHandleScale.xy;
float2 prevPixelCoord = (prevClipPos.xy * 0.5 + 0.5) * viewportSize;

// Write final AOV values to the payload
payload.aovMotionVector = prevPixelCoord - payload.aovMotionVector;
payload.aovMotionVector -= prevPixelCoord;
payload.aovAlbedo = aovData.albedo;
payload.aovNormal = aovData.normal;
}
Expand Down