Bug fixes, Scene changes and new features #376
|
@ -1,3 +1,3 @@
|
|||
Name: CutScene
|
||||
Name: CutSceneIntro
|
||||
ID: 91947920
|
||||
Type: 5
|
File diff suppressed because it is too large
Load Diff
|
@ -66,7 +66,7 @@ public class PickAndThrow : Script
|
|||
if (!silhouetteBag)
|
||||
Debug.LogError("silhouetteBag EMPTY");
|
||||
else
|
||||
silhouetteBagRend = silhouettePlayer.GetComponent<Renderable>();
|
||||
silhouetteBagRend = silhouetteBag.GetComponent<Renderable>();
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw");
|
||||
|
||||
|
@ -83,12 +83,15 @@ public class PickAndThrow : Script
|
|||
{
|
||||
//wait for daniel
|
||||
//0.00075f;
|
||||
/* Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent<Transform>().LocalPosition;
|
||||
Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent<Transform>().LocalPosition;
|
||||
float disSqr = dis.GetSqrMagnitude();
|
||||
Debug.Log($"DIS :{disSqr}");
|
||||
float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f);
|
||||
silhouettePlayerRend.Material.SetProperty<float>("data.offset", ratio * 0.00075f);
|
||||
silhouetteBagRend.Material.SetProperty<float>("data.offset", ratio * 0.00075f);*/
|
||||
float temp = (1 - 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)
|
||||
|
|
|
@ -97,7 +97,7 @@ public class Cutscene : Script
|
|||
{
|
||||
skip = true;
|
||||
oldDuration = duration;
|
||||
duration = 0.5f;
|
||||
duration = 0.1f;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
// 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;
|
||||
|
||||
// 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;
|
||||
created = rhs.created;
|
||||
logicalDeviceHdl = rhs.logicalDeviceHdl;
|
||||
pipelineLayout = rhs.pipelineLayout;
|
||||
|
||||
rhs.vkPipeline = VK_NULL_HANDLE;
|
||||
|
||||
|
|
|
@ -409,6 +409,7 @@ namespace SHADE
|
|||
, vkDescriptorSetLayoutsAllocate{std::move (rhs.vkDescriptorSetLayoutsAllocate)}
|
||||
, descriptorSetLayoutsPipeline { std::move(rhs.descriptorSetLayoutsPipeline) }
|
||||
, vkDescriptorSetLayoutsPipeline{ std::move(rhs.vkDescriptorSetLayoutsPipeline) }
|
||||
, onChangeCallbacks{ std::move (rhs.onChangeCallbacks)}
|
||||
{
|
||||
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
||||
}
|
||||
|
@ -515,6 +516,7 @@ namespace SHADE
|
|||
vkDescriptorSetLayoutsAllocate = std::move(rhs.vkDescriptorSetLayoutsAllocate);
|
||||
descriptorSetLayoutsPipeline = std::move(rhs.descriptorSetLayoutsPipeline);
|
||||
vkDescriptorSetLayoutsPipeline = std::move(rhs.vkDescriptorSetLayoutsPipeline);
|
||||
onChangeCallbacks = std::move(rhs.onChangeCallbacks);
|
||||
|
||||
rhs.vkPipelineLayout = VK_NULL_HANDLE;
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace SHADE
|
|||
, reflectedData {std::move (rhs.reflectedData)}
|
||||
, shaderName {std::move (rhs.shaderName)}
|
||||
, logicalDeviceHdl{ rhs.logicalDeviceHdl }
|
||||
, onChangeCallbacks{rhs.onChangeCallbacks }
|
||||
{
|
||||
rhs.vkShaderModule = VK_NULL_HANDLE;
|
||||
}
|
||||
|
@ -64,6 +65,7 @@ namespace SHADE
|
|||
reflectedData = std::move(rhs.reflectedData);
|
||||
shaderName = std::move(rhs.shaderName);
|
||||
logicalDeviceHdl = std::move(rhs.logicalDeviceHdl);
|
||||
onChangeCallbacks = std::move(rhs.onChangeCallbacks);
|
||||
|
||||
rhs.vkShaderModule = VK_NULL_HANDLE;
|
||||
return *this;
|
||||
|
@ -92,8 +94,8 @@ namespace SHADE
|
|||
|
||||
Recompile();
|
||||
|
||||
for (auto& callback : onChangeCallbacks)
|
||||
callback();
|
||||
//for (auto& callback : onChangeCallbacks)
|
||||
// callback();
|
||||
}
|
||||
|
||||
void SHVkShaderModule::AddCallback(ChangeCallback&& callback) noexcept
|
||||
|
|
Loading…
Reference in New Issue