mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
[ue4] Cleaned up base example. More to come. Fixed crash bug in material reevaluation in renderer component
This commit is contained in:
parent
7b27ecda89
commit
b8e94a84a9
Binary file not shown.
BIN
spine-ue4/Content/Raptor/Raptor_Blueprint.uasset
Normal file
BIN
spine-ue4/Content/Raptor/Raptor_Blueprint.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 40 KiB |
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
|
|
||||||
skeleton.png
|
|
||||||
size: 275,302
|
|
||||||
format: RGBA8888
|
|
||||||
filter: Linear,Linear
|
|
||||||
repeat: none
|
|
||||||
head
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 2
|
|
||||||
size: 271, 298
|
|
||||||
orig: 271, 298
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
|
|
||||||
skeleton2.png
|
|
||||||
size: 496,156
|
|
||||||
format: RGBA8888
|
|
||||||
filter: Linear,Linear
|
|
||||||
repeat: none
|
|
||||||
hoverboard_board
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 2
|
|
||||||
size: 492, 152
|
|
||||||
orig: 492, 152
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"skeleton": { "hash": "MTiZgk2LS7dpxtEZykSk3BMgpHM", "spine": "3.5.43", "width": 821.13, "height": 902.82, "images": "./images/" },
|
|
||||||
"bones": [
|
|
||||||
{ "name": "root" },
|
|
||||||
{ "name": "bone", "parent": "root", "x": -155.24, "y": 59.79 },
|
|
||||||
{ "name": "bone2", "parent": "root", "x": 231.1, "y": 40.28 },
|
|
||||||
{ "name": "bone3", "parent": "root", "x": 243.36, "y": -301.04 },
|
|
||||||
{ "name": "bone4", "parent": "root", "x": -170.12, "y": -308.37 },
|
|
||||||
{ "name": "bone5", "parent": "root", "x": -196.27, "y": -618.03 }
|
|
||||||
],
|
|
||||||
"slots": [
|
|
||||||
{ "name": "head", "bone": "bone", "attachment": "head" },
|
|
||||||
{ "name": "head2", "bone": "bone2", "attachment": "head", "blend": "additive" },
|
|
||||||
{ "name": "head3", "bone": "bone3", "attachment": "head", "blend": "screen" },
|
|
||||||
{ "name": "head4", "bone": "bone4", "attachment": "head", "blend": "multiply" },
|
|
||||||
{ "name": "hoverboard_board", "bone": "bone5", "attachment": "hoverboard_board" }
|
|
||||||
],
|
|
||||||
"skins": {
|
|
||||||
"default": {
|
|
||||||
"head": {
|
|
||||||
"head": { "width": 271, "height": 298 }
|
|
||||||
},
|
|
||||||
"head2": {
|
|
||||||
"head": { "y": 1.27, "width": 271, "height": 298 }
|
|
||||||
},
|
|
||||||
"head3": {
|
|
||||||
"head": { "width": 271, "height": 298 }
|
|
||||||
},
|
|
||||||
"head4": {
|
|
||||||
"head": { "y": -0.86, "width": 271, "height": 298 }
|
|
||||||
},
|
|
||||||
"hoverboard_board": {
|
|
||||||
"hoverboard_board": { "width": 492, "height": 152 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"animations": {
|
|
||||||
"animation": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
Binary file not shown.
@ -118,7 +118,7 @@ void USpineSkeletonRendererComponent::TickComponent (float DeltaTime, ELevelTick
|
|||||||
UTexture* oldTexture = nullptr;
|
UTexture* oldTexture = nullptr;
|
||||||
|
|
||||||
UMaterialInstanceDynamic* current = atlasNormalBlendMaterials[i];
|
UMaterialInstanceDynamic* current = atlasNormalBlendMaterials[i];
|
||||||
if(!current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
if(!current || !current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
||||||
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(NormalBlendMaterial, owner);
|
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(NormalBlendMaterial, owner);
|
||||||
material->SetTextureParameterValue(TextureParameterName, texture);
|
material->SetTextureParameterValue(TextureParameterName, texture);
|
||||||
atlasNormalBlendMaterials[i] = material;
|
atlasNormalBlendMaterials[i] = material;
|
||||||
@ -126,7 +126,7 @@ void USpineSkeletonRendererComponent::TickComponent (float DeltaTime, ELevelTick
|
|||||||
pageToNormalBlendMaterial.Add(currPage, atlasNormalBlendMaterials[i]);
|
pageToNormalBlendMaterial.Add(currPage, atlasNormalBlendMaterials[i]);
|
||||||
|
|
||||||
current = atlasAdditiveBlendMaterials[i];
|
current = atlasAdditiveBlendMaterials[i];
|
||||||
if(!current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
if(!current || !current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
||||||
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(AdditiveBlendMaterial, owner);
|
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(AdditiveBlendMaterial, owner);
|
||||||
material->SetTextureParameterValue(TextureParameterName, texture);
|
material->SetTextureParameterValue(TextureParameterName, texture);
|
||||||
atlasAdditiveBlendMaterials[i] = material;
|
atlasAdditiveBlendMaterials[i] = material;
|
||||||
@ -134,7 +134,7 @@ void USpineSkeletonRendererComponent::TickComponent (float DeltaTime, ELevelTick
|
|||||||
pageToAdditiveBlendMaterial.Add(currPage, atlasAdditiveBlendMaterials[i]);
|
pageToAdditiveBlendMaterial.Add(currPage, atlasAdditiveBlendMaterials[i]);
|
||||||
|
|
||||||
current = atlasMultiplyBlendMaterials[i];
|
current = atlasMultiplyBlendMaterials[i];
|
||||||
if(!current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
if(!current || !current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
||||||
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(MultiplyBlendMaterial, owner);
|
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(MultiplyBlendMaterial, owner);
|
||||||
material->SetTextureParameterValue(TextureParameterName, texture);
|
material->SetTextureParameterValue(TextureParameterName, texture);
|
||||||
atlasMultiplyBlendMaterials[i] = material;
|
atlasMultiplyBlendMaterials[i] = material;
|
||||||
@ -142,7 +142,7 @@ void USpineSkeletonRendererComponent::TickComponent (float DeltaTime, ELevelTick
|
|||||||
pageToMultiplyBlendMaterial.Add(currPage, atlasMultiplyBlendMaterials[i]);
|
pageToMultiplyBlendMaterial.Add(currPage, atlasMultiplyBlendMaterials[i]);
|
||||||
|
|
||||||
current = atlasScreenBlendMaterials[i];
|
current = atlasScreenBlendMaterials[i];
|
||||||
if(!current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
if(!current || !current->GetTextureParameterValue(TextureParameterName, oldTexture) || oldTexture != texture) {
|
||||||
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(ScreenBlendMaterial, owner);
|
UMaterialInstanceDynamic* material = UMaterialInstanceDynamic::Create(ScreenBlendMaterial, owner);
|
||||||
material->SetTextureParameterValue(TextureParameterName, texture);
|
material->SetTextureParameterValue(TextureParameterName, texture);
|
||||||
atlasScreenBlendMaterials[i] = material;
|
atlasScreenBlendMaterials[i] = material;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user