Skip to content

Commit 0374f41

Browse files
committedSep 2, 2022
Optimised Sampler windowing for small grain sizes
1 parent 5d86967 commit 0374f41

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed
 

‎Assets/Materials/coreMaterials/coreColorGlow.mat

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Material:
6161
- _Cutoff: 0.5
6262
- _DetailNormalMapScale: 1
6363
- _DstBlend: 10
64-
- _EmissionGain: 0.1723334
64+
- _EmissionGain: 0.18732806
6565
- _GlossMapScale: 1
6666
- _Glossiness: 0.5
6767
- _GlossyReflections: 0
@@ -78,5 +78,5 @@ Material:
7878
m_Colors:
7979
- _Color: {r: 1, g: 1, b: 1, a: 0.40392157}
8080
- _EmissionColor: {r: 34.08462, g: 34.08462, b: 34.08462, a: 1}
81-
- _TintColor: {r: 0.03446668, g: 0.08961335, b: 0.1723334, a: 0.3446668}
81+
- _TintColor: {r: 0.03746561, g: 0.09741056, b: 0.18732806, a: 0.3746561}
8282
m_BuildTextureStacks: []
Binary file not shown.
Binary file not shown.

‎Assets/Text/Materials/3DUItext.mat

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ Material:
8080
- _Color: {r: 1, g: 1, b: 1, a: 1}
8181
- _DiffuseColor: {r: 1, g: 1, b: 1, a: 1}
8282
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
83-
- _TintColor: {r: 0.45342794, g: 0.45342794, b: 0.45342794, a: 0.9798655}
83+
- _TintColor: {r: 0.4497704, g: 0.4497704, b: 0.4497704, a: 0.97196144}
8484
m_BuildTextureStacks: []

‎ProjectSettings/ProjectSettings.asset

+3-3
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ PlayerSettings:
796796
metroSplashScreenUseBackgroundColor: 1
797797
platformCapabilities:
798798
WindowsStoreApps:
799-
EnterpriseAuthentication: False
799+
CodeGeneration: False
800800
VideosLibrary: False
801801
HumanInterfaceDevice: False
802802
Location: False
@@ -828,10 +828,10 @@ PlayerSettings:
828828
PointOfService: False
829829
RecordedCallsFolder: False
830830
Contacts: False
831+
InternetClient: False
831832
Proximity: False
832-
CodeGeneration: False
833833
BackgroundMediaPlayback: False
834-
InternetClient: False
834+
EnterpriseAuthentication: False
835835
metroTargetDeviceFamilies:
836836
Desktop: False
837837
Holographic: False

‎SoundStageNative/main.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ extern "C" {
408408
{
409409

410410
float* clipdata = reinterpret_cast<float*>(clip);
411+
float sampleBoundsCenter = (sampleBounds[0] + sampleBounds[1]) * 0.5f;
411412

412413
for (int i = 0; i < length; i += channels)
413414
{
@@ -456,7 +457,7 @@ extern "C" {
456457

457458
float windowing = 1.f;
458459
if(windowLength != 0){
459-
if (floatingBufferCount < sampleBounds[0] + windowLength) { // 480 samples = 10ms
460+
if (floatingBufferCount < sampleBounds[0] + windowLength && floatingBufferCount <= sampleBoundsCenter) {
460461
windowing = _map(floatingBufferCount, sampleBounds[0], sampleBounds[0] + windowLength, 0.f, 1.f, 0.5f);
461462
} else if (floatingBufferCount > sampleBounds[1] - windowLength) {
462463
windowing = _map(floatingBufferCount, sampleBounds[1] - windowLength, sampleBounds[1], 1.f, 0.f, 0.5f);

0 commit comments

Comments
 (0)