Temp FIN
This commit is contained in:
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316069
|
||||
packageName: PotaToon
|
||||
packageVersion: 1.3.6
|
||||
packageVersion: 1.3.7
|
||||
assetPath: Assets/PotaToon/Shaders/OIT/LinkedListCreation.hlsl
|
||||
uploadId: 814994
|
||||
uploadId: 827176
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316069
|
||||
packageName: PotaToon
|
||||
packageVersion: 1.3.6
|
||||
packageVersion: 1.3.7
|
||||
assetPath: Assets/PotaToon/Shaders/OIT/LinkedListRendering.hlsl
|
||||
uploadId: 814994
|
||||
uploadId: 827176
|
||||
|
||||
@@ -11,6 +11,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316069
|
||||
packageName: PotaToon
|
||||
packageVersion: 1.3.6
|
||||
packageVersion: 1.3.7
|
||||
assetPath: Assets/PotaToon/Shaders/OIT/OITFullscreenRender.shader
|
||||
uploadId: 814994
|
||||
uploadId: 827176
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316069
|
||||
packageName: PotaToon
|
||||
packageVersion: 1.3.6
|
||||
packageVersion: 1.3.7
|
||||
assetPath: Assets/PotaToon/Shaders/OIT/OITOutlineUtils.hlsl
|
||||
uploadId: 814994
|
||||
uploadId: 827176
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
// Unity's HLSL seems not to support dynamic array size, so we can only set this before compilation
|
||||
#define MAX_SORTED_PIXELS 8
|
||||
#define POW_2_24 16777216
|
||||
|
||||
//https://github.com/GameTechDev/AOIT-Update/blob/master/OIT_DX11/AOIT%20Technique/AOIT.hlsl
|
||||
// UnpackRGBA takes a uint value and converts it to a float4
|
||||
@@ -27,7 +28,7 @@ uint PackRGBA(float4 unpackedInput)
|
||||
}
|
||||
|
||||
float UnpackDepth(uint uDepthSampleIdx) {
|
||||
return (float)(uDepthSampleIdx >> 8UL) / (pow(2, 24) - 1);
|
||||
return (float)(uDepthSampleIdx >> 8UL) / (POW_2_24 - 1);
|
||||
}
|
||||
|
||||
uint UnpackSampleIdx(uint uDepthSampleIdx) {
|
||||
@@ -35,7 +36,7 @@ uint UnpackSampleIdx(uint uDepthSampleIdx) {
|
||||
}
|
||||
|
||||
uint PackDepthSampleIdx(float depth, uint uSampleIdx) {
|
||||
uint d = (uint)(saturate(depth) * (pow(2, 24) - 1));
|
||||
uint d = (uint)(saturate(depth) * (POW_2_24 - 1));
|
||||
return d << 8UL | uSampleIdx;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 316069
|
||||
packageName: PotaToon
|
||||
packageVersion: 1.3.6
|
||||
packageVersion: 1.3.7
|
||||
assetPath: Assets/PotaToon/Shaders/OIT/OitUtils.hlsl
|
||||
uploadId: 814994
|
||||
uploadId: 827176
|
||||
|
||||
Reference in New Issue
Block a user