Skip to content

[HDRP] Try to fix Yamato #6252

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

Merged
merged 11 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,39 @@ MonoBehaviour:
XrSdk:
StereoModes: 0
Reason: unstable on XR yamato
- FilteredScene: {fileID: 0}
FilteredScenes:
- {fileID: 102900000, guid: d0d3270af482d2349baf7fc2a1dc7d4f, type: 3}
ColorSpace: 1
BuildPlatform: -2
GraphicsDevice: 2
XrSdk:
StereoModes: 0
Reason: unstable with cache server
- FilteredScene: {fileID: 0}
FilteredScenes:
- {fileID: 102900000, guid: d0d3270af482d2349baf7fc2a1dc7d4f, type: 3}
ColorSpace: 1
BuildPlatform: -2
GraphicsDevice: 18
XrSdk:
StereoModes: 0
Reason: unstable with cache server
- FilteredScene: {fileID: 0}
FilteredScenes:
- {fileID: 102900000, guid: 78446c36daacd444c8a07b5671274a51, type: 3}
ColorSpace: 1
BuildPlatform: -2
GraphicsDevice: 2
XrSdk:
StereoModes: 0
Reason: unstable with cache server
- FilteredScene: {fileID: 0}
FilteredScenes:
- {fileID: 102900000, guid: 78446c36daacd444c8a07b5671274a51, type: 3}
ColorSpace: 1
BuildPlatform: -2
GraphicsDevice: 18
XrSdk:
StereoModes: 0
Reason: unstable with cache server
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,14 @@ void StoreLightVolumeCache(int lightIndex, int coarseIndex, uint volumeType)
{
// 3 bits for the volume type, in case we have a corrupted one we can early out of the switch statement.
// 29 bits for a coarse light index.
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (coarseIndex << 3);
s_lightVolumesCache[lightIndex] = (volumeType & 0x7) | (uint)(coarseIndex << 3);
}

void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out int volumeType)
void LoadLightVolumeCache(int lightIndex, out int coarseIndex, out uint volumeType)
{
int data = s_lightVolumesCache[lightIndex];
coarseIndex = data >> 3;
volumeType = data & 0x7;
volumeType = (uint)(data & 0x7);
}

// initializes ldsNrLightsFinal with the number of accepted lights.
Expand All @@ -433,7 +433,7 @@ void FinePruneLights(uint threadID, int iNrCoarseLights, uint2 viTilLL, float vL

if (threadID < (uint)iNrCoarseLights)
{
int idxCoarse = GetCoarseLightIndex(threadID, iNrCoarseLights);
int idxCoarse = GetCoarseLightIndex((int)threadID, iNrCoarseLights);
uint uLightVolume = _LightVolumeData[idxCoarse].lightVolume;
StoreLightVolumeCache(threadID, idxCoarse, uLightVolume);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ void UPSAMPLE_KERNEL(uint3 finalCoord : SV_DispatchThreadID,
#endif

// Estimate the transmittance that shall be used
float finalTransmittance = EvaluateFinalTransmittance(currentColor, currentClouds.w);
float finalTransmittance = EvaluateFinalTransmittance(currentColor.rgb, currentClouds.w);

// Compute the fog attenuation of the clouds
float3 fogColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ float EvaluateFinalTransmittance(float3 color, float transmittance)
// Due to the high intensity of the sun, we often need apply the transmittance in a tonemapped space
float3 resultColor = color / (1.0 + color) * transmittance;
resultColor = resultColor / (1.0 - resultColor);
return _ImprovedTransmittanceBlend ? (resultColor / color) : transmittance;
return _ImprovedTransmittanceBlend ? Luminance(resultColor / color) : transmittance;
}
#endif // REAL_TIME_VOLUMETRIC_CLOUDS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,10 @@ int GetTileClass(float2 sampleTC)

if (minRadius < 1 && maxRadius < 1)
return FAST_INFOCUS_TILE;
if (minRadius > 2.5 && maxRadius > 2.5)
else if (minRadius > 2.5 && maxRadius > 2.5)
return FAST_DEFOCUS_TILE;
return SLOW_INFOCUS_TILE;
else
return SLOW_INFOCUS_TILE;
}

void DebugTiles(float2 sampleTC, inout float3 output)
Expand Down
4 changes: 2 additions & 2 deletions com.unity.render-pipelines.high-definition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"unity": "2022.1",
"displayName": "High Definition RP",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.burst": "1.5.0",
"com.unity.mathematics": "1.2.4",
"com.unity.burst": "1.6.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
Expand Down