Skip to content

Commit

Permalink
Merge pull request #2820 from decentraland/release/release-18-11-2024
Browse files Browse the repository at this point in the history
release: 18-11-2024
  • Loading branch information
aixaCode authored Nov 18, 2024
2 parents 46a6a9a + 969352f commit 772435a
Show file tree
Hide file tree
Showing 109 changed files with 10,500 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
profile: none
clean_build: true
cache_strategy: none
version: ${{ needs.get-info.outputs.next_short_version }}
version: ${{ needs.get-info.outputs.version }}
sentry_enabled: true
is_release_build: true
install_source: ${{ matrix.install_source }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-unitycloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ on:
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ inputs.install_source }}
cancel-in-progress: true

jobs:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/s3-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ jobs:
"version": "${{ env.latest_release }}",
"timestamp": "'$(date -u +"%Y-%m-%dT%H:%M:%SZ")'"
}' > latest.json
aws s3 cp latest.json s3://$EXPLORER_TEAM_S3_BUCKET/$RELEASES_PATH/latest.json
cat latest.json
aws s3 ls s3://$EXPLORER_TEAM_S3_BUCKET/
aws s3 cp latest.json s3://$EXPLORER_TEAM_S3_BUCKET/$RELEASES_PATH/latest.json --debug
5 changes: 5 additions & 0 deletions Explorer/Assets/AddressableAssetsData/AssetGroups/UI.asset
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 73f988cecacd42e48920937e996e446d
m_Address: ScreencaptureCameraHUD
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7dc631660587a41589ba55c08ff7fa73
m_Address: ExplorePanel
m_ReadOnly: 0
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public static partial class AvatarMaterialConfiguration
private static readonly int ALPHA_DST_BLEND_TARGET = Shader.PropertyToID("_AlphaDstBlend");
private static readonly int ALPHA_DST_BLEND_ORIGINAL = Shader.PropertyToID("_DstBlendAlpha");

private static readonly (string suffix, string category, GetFacialFeatureColor getColor)[] SUFFIX_CATEGORY_MAP =
private static readonly (string suffix, string category, int defaultSlotIndexUsed, GetFacialFeatureColor getColor)[] SUFFIX_CATEGORY_MAP =
{
("eyes", WearablesConstants.Categories.EYES, (in AvatarShapeComponent shape) => shape.EyesColor),
("eyebrows", WearablesConstants.Categories.EYEBROWS, (in AvatarShapeComponent shape) => shape.HairColor),
("mouth", WearablesConstants.Categories.MOUTH, (in AvatarShapeComponent shape) => shape.SkinColor),
("eyes", WearablesConstants.Categories.EYES, defaultSlotIndexUsed: 1, (in AvatarShapeComponent shape) => shape.EyesColor),
("eyebrows", WearablesConstants.Categories.EYEBROWS, defaultSlotIndexUsed: 0, (in AvatarShapeComponent shape) => shape.HairColor),
("mouth", WearablesConstants.Categories.MOUTH, defaultSlotIndexUsed: 0, (in AvatarShapeComponent shape) => shape.SkinColor),
};

public static AvatarCustomSkinningComponent.MaterialSetup SetupMaterial(Renderer meshRenderer, Material originalMaterial, int lastWearableVertCount, IAvatarMaterialPoolHandler poolHandler,
Expand Down Expand Up @@ -115,24 +115,24 @@ private static (Material, TextureArraySlot?[], int) TrySetupFacialFeature(
{
for (var i = 0; i < SUFFIX_CATEGORY_MAP.Length; i++)
{
(string suffix, string category, GetFacialFeatureColor getColor) = SUFFIX_CATEGORY_MAP[i];
(string suffix, string category, int defaultSlotIndexUsed, GetFacialFeatureColor getColor) = SUFFIX_CATEGORY_MAP[i];

if (meshRenderer.name.Contains(suffix, StringComparison.OrdinalIgnoreCase))
{
result = true;
return DoFacialFeature(poolHandler, facialFeatures.Value[category], getColor(in avatarShapeComponent));
return DoFacialFeature(poolHandler, facialFeatures.Value[category], getColor(in avatarShapeComponent), defaultSlotIndexUsed);
}
}

result = false;
return default((Material, TextureArraySlot?[], int));
}

private static (Material, TextureArraySlot?[], int) DoFacialFeature(IAvatarMaterialPoolHandler poolHandler, IReadOnlyDictionary<int, Texture> replacementTexture, Color color)
private static (Material, TextureArraySlot?[], int) DoFacialFeature(IAvatarMaterialPoolHandler poolHandler, IReadOnlyDictionary<int, Texture> replacementTexture, Color color, int defaultSlotIndexUsed = 0)
{
PoolMaterialSetup poolMaterialSetup = poolHandler.GetMaterialPool(TextureArrayConstants.SHADERID_DCL_FACIAL_FEATURES);
Material avatarMaterial = poolMaterialSetup.Pool.Get();
TextureArraySlot?[] slots = poolMaterialSetup.TextureArrayContainer.SetTextures(replacementTexture, avatarMaterial);
TextureArraySlot?[] slots = poolMaterialSetup.TextureArrayContainer.SetTextures(replacementTexture, avatarMaterial, defaultSlotIndexUsed);
avatarMaterial.SetColor(BASE_COLOR, color);
avatarMaterial.SetInt(Z_WRITE_MODE, 0);
avatarMaterial.renderQueue = (int)RenderQueue.AlphaTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void ReleaseSlots(TextureArraySlot?[] slots)
return results;
}

public TextureArraySlot?[] SetTextures(IReadOnlyDictionary<int, Texture> textures, Material targetMaterial)
public TextureArraySlot?[] SetTextures(IReadOnlyDictionary<int, Texture> textures, Material targetMaterial, int defaultSlotIndexUsed = 0)
{
TextureArraySlot?[] results = slotsPool.Get();

Expand All @@ -57,7 +57,7 @@ public void ReleaseSlots(TextureArraySlot?[] slots)
if (textures.TryGetValue(mapping.OriginalTextureID, out var texture))
results[i] = mapping.Handler.SetTexture(targetMaterial, texture as Texture2D, new Vector2Int(texture.width, texture.height));
else
mapping.Handler.SetDefaultTexture(targetMaterial, mapping.DefaultFallbackResolution);
mapping.Handler.SetDefaultTexture(targetMaterial, mapping.DefaultFallbackResolution, defaultSlotIndexUsed);
}

return results;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ private TextureArraySlotHandler CreateHandler(TextureArrayResolutionDescriptor d
handlersByResolution[resolution] = slotHandler;

// When the handler is created initialize the default texture
if (defaultTextures.TryGetValue(new TextureArrayKey(textureID, resolution), out var defaultTexture))
for (int i = 0; i < defaultTextures.Count; ++i)
{
var defaultSlot = slotHandler.GetNextFreeSlot();
Graphics.CopyTexture(defaultTexture, srcElement: 0, srcMip: 0, defaultSlot.TextureArray, dstElement: defaultSlot.UsedSlotIndex, dstMip: 0);
if (defaultTextures.TryGetValue(new TextureArrayKey(textureID, resolution, i), out var defaultTexture))
{
var defaultSlot = slotHandler.GetNextFreeSlot();
Graphics.CopyTexture(defaultTexture, srcElement: 0, srcMip: 0, defaultSlot.TextureArray, dstElement: defaultSlot.UsedSlotIndex, dstMip: 0);
}
}

return slotHandler;
Expand All @@ -93,10 +96,13 @@ private TextureArraySlotHandler CreateHandler(Vector2Int resolution)
handlersByResolution[resolution] = slotHandler;

// When the handler is created initialize the default texture
if (defaultTextures.TryGetValue(new TextureArrayKey(textureID, resolution), out var defaultTexture))
for (int i = 0; i < defaultTextures.Count; ++i)
{
var defaultSlot = slotHandler.GetNextFreeSlot();
Graphics.CopyTexture(defaultTexture, srcElement: 0, srcMip: 0, defaultSlot.TextureArray, dstElement: defaultSlot.UsedSlotIndex, dstMip: 0);
if (defaultTextures.TryGetValue(new TextureArrayKey(textureID, resolution, i), out var defaultTexture))
{
var defaultSlot = slotHandler.GetNextFreeSlot();
Graphics.CopyTexture(defaultTexture, srcElement: 0, srcMip: 0, defaultSlot.TextureArray, dstElement: defaultSlot.UsedSlotIndex, dstMip: 0);
}
}

return slotHandler;
Expand Down Expand Up @@ -127,18 +133,18 @@ internal Texture2DArray GetDefaultTextureArray(Vector2Int resolution)
return GetOrCreateSlotHandler(resolution).arrays[DEFAULT_SLOT_INDEX];
}

public void SetDefaultTexture(Material material, int resolution)
public void SetDefaultTexture(Material material, int resolution, int defaultSlotIndexUsed = 0)
{
// Default slot is always zero
// Default textures are always squared
var defaultSlotArray = GetDefaultTextureArray(new Vector2Int(resolution, resolution));

material.SetInteger(arrayID, DEFAULT_SLOT_INDEX);
material.SetInteger(arrayID, defaultSlotIndexUsed);
material.SetTexture(textureID, defaultSlotArray);
}

public TextureFormat GetTextureFormat() =>
textureFormat;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,29 @@ namespace DCL.AvatarRendering.AvatarShape.Rendering.TextureArray
{
public readonly int Id;
public readonly Vector2Int Resolution;
public readonly int OptionValue;

public TextureArrayKey(int id, Vector2Int resolution)
public TextureArrayKey(int id, Vector2Int resolution, int optionValue = 0)
{
Id = id;
Resolution = resolution;
OptionValue = optionValue;
}

public TextureArrayKey(int id, int squareResolution)
public TextureArrayKey(int id, int squareResolution, int optionValue = 0)
{
Id = id;
Resolution = new Vector2Int(squareResolution, squareResolution);
OptionValue = optionValue;
}

public bool Equals(TextureArrayKey other) =>
Id == other.Id && Resolution == other.Resolution;
Id == other.Id && Resolution == other.Resolution && OptionValue == other.OptionValue;

public override bool Equals(object obj) =>
obj is TextureArrayKey other && Equals(other);

public override int GetHashCode() =>
HashCode.Combine(Id, Resolution);
HashCode.Combine(Id, Resolution, OptionValue);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ Shader "DCL/DCL_Toon"
// }

HLSLPROGRAM
//#pragma exclude_renderers gles gles3 glcore
#pragma target 4.5
#pragma vertex vert
#pragma fragment frag
Expand Down
11 changes: 6 additions & 5 deletions Explorer/Assets/DCL/Character/CharacterCamera/CameraMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
{
public enum CameraMode : byte
{
FirstPerson,
ThirdPerson,
DroneView,
SDKCamera,
Unknown = 0,
FirstPerson = 1,
ThirdPerson = 2,
DroneView = 3,
SDKCamera = 4,

/// <summary>
/// Free-fly, does not follow character, intercepts controls designated for character movement
/// </summary>
Free,
Free = 5,
}
}
Loading

0 comments on commit 772435a

Please sign in to comment.