Bug fixes, Scene changes and new features #376
|
@ -1,3 +1,3 @@
|
||||||
Name: CutScene
|
Name: CutSceneIntro
|
||||||
ID: 91947920
|
ID: 91947920
|
||||||
Type: 5
|
Type: 5
|
File diff suppressed because it is too large
Load Diff
|
@ -66,7 +66,7 @@ public class PickAndThrow : Script
|
||||||
if (!silhouetteBag)
|
if (!silhouetteBag)
|
||||||
Debug.LogError("silhouetteBag EMPTY");
|
Debug.LogError("silhouetteBag EMPTY");
|
||||||
else
|
else
|
||||||
silhouetteBagRend = silhouettePlayer.GetComponent<Renderable>();
|
silhouetteBagRend = silhouetteBag.GetComponent<Renderable>();
|
||||||
|
|
||||||
AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw");
|
AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw");
|
||||||
|
|
||||||
|
@ -83,12 +83,15 @@ public class PickAndThrow : Script
|
||||||
{
|
{
|
||||||
//wait for daniel
|
//wait for daniel
|
||||||
//0.00075f;
|
//0.00075f;
|
||||||
/* Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent<Transform>().LocalPosition;
|
Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent<Transform>().LocalPosition;
|
||||||
float disSqr = dis.GetSqrMagnitude();
|
float disSqr = dis.GetSqrMagnitude();
|
||||||
Debug.Log($"DIS :{disSqr}");
|
|
||||||
float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f);
|
float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f);
|
||||||
silhouettePlayerRend.Material.SetProperty<float>("data.offset", ratio * 0.00075f);
|
float temp = (1 - ratio) * 0.00075f;
|
||||||
silhouetteBagRend.Material.SetProperty<float>("data.offset", ratio * 0.00075f);*/
|
if (temp <= 0.0006f)
|
||||||
|
temp = 0.1f;
|
||||||
|
Debug.Log($" RATIO {temp}");
|
||||||
|
silhouettePlayerRend.Material.SetProperty<float>("data.offset", temp);
|
||||||
|
silhouetteBagRend.Material.SetProperty<float>("data.offset", temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timer <= delayTimer)
|
if (timer <= delayTimer)
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class Cutscene : Script
|
||||||
{
|
{
|
||||||
skip = true;
|
skip = true;
|
||||||
oldDuration = duration;
|
oldDuration = duration;
|
||||||
duration = 0.5f;
|
duration = 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
|
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
|
||||||
|
|
|
@ -56,7 +56,7 @@ layout(input_attachment_index = 0, set = 3, binding = 0) uniform subpassInput de
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// Sample depth buffer using UV and save it
|
// Sample depth buffer using UV and save it MatProp.data[In2.materialIndex].offsets
|
||||||
float currentDepth = subpassLoad (depthBuffer).r + MatProp.data[In2.materialIndex].offset;
|
float currentDepth = subpassLoad (depthBuffer).r + MatProp.data[In2.materialIndex].offset;
|
||||||
|
|
||||||
// Use depth buffer to check against current fragment's depth. If fragment is behind depth buffer, render fragment.
|
// Use depth buffer to check against current fragment's depth. If fragment is behind depth buffer, render fragment.
|
||||||
|
|
|
@ -340,6 +340,7 @@ namespace SHADE
|
||||||
pipelineType = rhs.pipelineType;
|
pipelineType = rhs.pipelineType;
|
||||||
created = rhs.created;
|
created = rhs.created;
|
||||||
logicalDeviceHdl = rhs.logicalDeviceHdl;
|
logicalDeviceHdl = rhs.logicalDeviceHdl;
|
||||||
|
pipelineLayout = rhs.pipelineLayout;
|
||||||
|
|
||||||
rhs.vkPipeline = VK_NULL_HANDLE;
|
rhs.vkPipeline = VK_NULL_HANDLE;
|
||||||
|
|
||||||
|
|
|
@ -409,6 +409,7 @@ namespace SHADE
|
||||||
, vkDescriptorSetLayoutsAllocate{std::move (rhs.vkDescriptorSetLayoutsAllocate)}
|
, vkDescriptorSetLayoutsAllocate{std::move (rhs.vkDescriptorSetLayoutsAllocate)}
|
||||||
, descriptorSetLayoutsPipeline { std::move(rhs.descriptorSetLayoutsPipeline) }
|
, descriptorSetLayoutsPipeline { std::move(rhs.descriptorSetLayoutsPipeline) }
|
||||||
, vkDescriptorSetLayoutsPipeline{ std::move(rhs.vkDescriptorSetLayoutsPipeline) }
|
, vkDescriptorSetLayoutsPipeline{ std::move(rhs.vkDescriptorSetLayoutsPipeline) }
|
||||||
|
, onChangeCallbacks{ std::move (rhs.onChangeCallbacks)}
|
||||||
{
|
{
|
||||||
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
@ -515,6 +516,7 @@ namespace SHADE
|
||||||
vkDescriptorSetLayoutsAllocate = std::move(rhs.vkDescriptorSetLayoutsAllocate);
|
vkDescriptorSetLayoutsAllocate = std::move(rhs.vkDescriptorSetLayoutsAllocate);
|
||||||
descriptorSetLayoutsPipeline = std::move(rhs.descriptorSetLayoutsPipeline);
|
descriptorSetLayoutsPipeline = std::move(rhs.descriptorSetLayoutsPipeline);
|
||||||
vkDescriptorSetLayoutsPipeline = std::move(rhs.vkDescriptorSetLayoutsPipeline);
|
vkDescriptorSetLayoutsPipeline = std::move(rhs.vkDescriptorSetLayoutsPipeline);
|
||||||
|
onChangeCallbacks = std::move(rhs.onChangeCallbacks);
|
||||||
|
|
||||||
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,8 @@ namespace SHADE
|
||||||
, entryPoint {std::move (rhs.entryPoint)}
|
, entryPoint {std::move (rhs.entryPoint)}
|
||||||
, reflectedData {std::move (rhs.reflectedData)}
|
, reflectedData {std::move (rhs.reflectedData)}
|
||||||
, shaderName {std::move (rhs.shaderName)}
|
, shaderName {std::move (rhs.shaderName)}
|
||||||
, logicalDeviceHdl {rhs.logicalDeviceHdl}
|
, logicalDeviceHdl{ rhs.logicalDeviceHdl }
|
||||||
|
, onChangeCallbacks{rhs.onChangeCallbacks }
|
||||||
{
|
{
|
||||||
rhs.vkShaderModule = VK_NULL_HANDLE;
|
rhs.vkShaderModule = VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
@ -64,6 +65,7 @@ namespace SHADE
|
||||||
reflectedData = std::move(rhs.reflectedData);
|
reflectedData = std::move(rhs.reflectedData);
|
||||||
shaderName = std::move(rhs.shaderName);
|
shaderName = std::move(rhs.shaderName);
|
||||||
logicalDeviceHdl = std::move(rhs.logicalDeviceHdl);
|
logicalDeviceHdl = std::move(rhs.logicalDeviceHdl);
|
||||||
|
onChangeCallbacks = std::move(rhs.onChangeCallbacks);
|
||||||
|
|
||||||
rhs.vkShaderModule = VK_NULL_HANDLE;
|
rhs.vkShaderModule = VK_NULL_HANDLE;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -92,8 +94,8 @@ namespace SHADE
|
||||||
|
|
||||||
Recompile();
|
Recompile();
|
||||||
|
|
||||||
for (auto& callback : onChangeCallbacks)
|
//for (auto& callback : onChangeCallbacks)
|
||||||
callback();
|
// callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHVkShaderModule::AddCallback(ChangeCallback&& callback) noexcept
|
void SHVkShaderModule::AddCallback(ChangeCallback&& callback) noexcept
|
||||||
|
|
Loading…
Reference in New Issue