[merge commit]
This commit is contained in:
@@ -0,0 +1,289 @@
|
||||
#include "Engine_Shader_Functions.hlsli"
|
||||
|
||||
struct Particle
|
||||
{
|
||||
float4 vRight;
|
||||
float4 vUp;
|
||||
float4 vLook;
|
||||
float4 vTranslation;
|
||||
|
||||
float2 vLifeTime;
|
||||
};
|
||||
|
||||
struct ParticleValue
|
||||
{
|
||||
float fSpeed;
|
||||
float fRotaionSpeed;
|
||||
|
||||
float4 vOriginRight;
|
||||
float4 vOriginUp;
|
||||
float4 vOriginLook;
|
||||
float4 vOriginTranslation;
|
||||
|
||||
float2 vMaskingUVMoveTime;
|
||||
float2 vDiffuseUVMoveTime;
|
||||
float2 vDistortionUVMoveTime;
|
||||
float2 vNoiseUVMoveTime;
|
||||
float2 vAniTime;
|
||||
|
||||
float2 vAniIndex;
|
||||
float fGravity;
|
||||
|
||||
float3 vSinAmount;
|
||||
float3 vDeltaAngle;
|
||||
float3 vDeltaAxisAngle;
|
||||
|
||||
float fDrag;
|
||||
float3 vPivot;
|
||||
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<Particle> g_ParticleBufferInput : register(t0);
|
||||
StructuredBuffer<ParticleValue> g_ParticleValueBufferInput : register(t1);
|
||||
|
||||
RWStructuredBuffer<Particle> g_VBInstanceOutput : register(u0);
|
||||
RWStructuredBuffer<ParticleValue> g_ParticleValueOutput : register(u1);
|
||||
|
||||
cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐이더 바인딩할때 인덱스가 동일해야함
|
||||
{
|
||||
row_major matrix CamViewInvMatrix;
|
||||
|
||||
bool isLoop; // 상수 버퍼에서 불값은 4바이트로 처리되기 때문에 반드시 클라에서는 int형으로 선언해라
|
||||
bool isDrop;
|
||||
bool isMoveForward;
|
||||
bool isSinWave;
|
||||
|
||||
bool isTurn;
|
||||
bool isAxisTurn;
|
||||
bool isPivotMove;
|
||||
bool isSizeMove;
|
||||
|
||||
float fTimeDelta;
|
||||
float fPadding1; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
|
||||
float fPadding2;
|
||||
float fPadding3;
|
||||
}
|
||||
|
||||
//내가 몇개의 스레드를 사용할 것인지 지정하는데
|
||||
//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다.
|
||||
[numthreads(256, 1, 1)]
|
||||
void CS_MAIN(
|
||||
uint3 DispatchThreadID : SV_DispatchThreadID)
|
||||
{
|
||||
int iIndex = DispatchThreadID.x; // 배열 인덱스
|
||||
|
||||
Particle particle = g_ParticleBufferInput[iIndex];
|
||||
|
||||
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
|
||||
|
||||
// 라이프타임 움직임
|
||||
particle.vLifeTime.x += fTimeDelta;
|
||||
|
||||
if (particle.vLifeTime.x >= particle.vLifeTime.y)
|
||||
{
|
||||
if (isLoop == false)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
//초기화
|
||||
particle.vRight = particleValue.vOriginRight;
|
||||
particle.vUp = particleValue.vOriginUp;
|
||||
particle.vLook = particleValue.vOriginLook;
|
||||
particle.vTranslation = particleValue.vOriginTranslation;
|
||||
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particleValue.vAniIndex.x = 0.f;
|
||||
|
||||
|
||||
g_VBInstanceOutput[iIndex] = particle;
|
||||
g_ParticleValueOutput[iIndex] = particleValue;
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
if (isMoveForward)
|
||||
{
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float fRatio = 1 - (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
}
|
||||
|
||||
if (isPivotMove)
|
||||
{
|
||||
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
|
||||
}
|
||||
|
||||
if (isDrop == true)
|
||||
{
|
||||
particle.vTranslation.y -= 0.5f * particle.vLifeTime.x * particleValue.fGravity;
|
||||
}
|
||||
|
||||
/* 사인 웨이브 */
|
||||
if(isSinWave == true)
|
||||
{
|
||||
particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f);
|
||||
}
|
||||
|
||||
if (isTurn == true)
|
||||
{
|
||||
/* ROTATE */
|
||||
float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta);
|
||||
float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta);
|
||||
float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta);
|
||||
|
||||
|
||||
float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat));
|
||||
|
||||
float4x4 CurRotatemat = {particle.vRight, particle.vUp, particle.vLook, vector(0.f , 0.f, 0.f, 1.f)};
|
||||
|
||||
|
||||
|
||||
CurRotatemat = mul(CombinedRotMat, CurRotatemat);
|
||||
|
||||
particle.vRight = CurRotatemat[0].xyzw;
|
||||
particle.vUp = CurRotatemat[1].xyzw;
|
||||
particle.vLook = CurRotatemat[2].xyzw;
|
||||
|
||||
}
|
||||
|
||||
if (isAxisTurn)
|
||||
{
|
||||
float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta);
|
||||
float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta);
|
||||
float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta);
|
||||
|
||||
|
||||
float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat));
|
||||
|
||||
float4x4 CurRotatemat = { particle.vRight, particle.vUp, particle.vLook, vector(0.f, 0.f, 0.f, 1.f) };
|
||||
|
||||
|
||||
CurRotatemat = mul(CurRotatemat ,CombinedRotMat);
|
||||
|
||||
particle.vRight = CurRotatemat[0].xyzw;
|
||||
particle.vUp = CurRotatemat[1].xyzw;
|
||||
particle.vLook = CurRotatemat[2].xyzw;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (isSizeMove == true)
|
||||
{
|
||||
float3 CurLength =
|
||||
{
|
||||
length(particle.vRight),
|
||||
length(particle.vUp),
|
||||
length(particle.vLook),
|
||||
};
|
||||
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float fRatio = 1 - (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fSizeDrag;
|
||||
|
||||
if (particleValue.fSizeDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
//fDrag *= fRatio;
|
||||
|
||||
CurLength += particleValue.vDeltaSize * fTimeDelta * fDrag;
|
||||
|
||||
if (CurLength.x < FLT_EPSILON5)
|
||||
CurLength.x = FLT_EPSILON5;
|
||||
|
||||
if (CurLength.y < FLT_EPSILON5)
|
||||
CurLength.y = FLT_EPSILON5;
|
||||
|
||||
if (CurLength.z < FLT_EPSILON5)
|
||||
CurLength.z = FLT_EPSILON5;
|
||||
|
||||
particle.vRight = normalize(particle.vRight) * CurLength.x;
|
||||
particle.vUp = normalize(particle.vUp) * CurLength.y;
|
||||
particle.vLook = normalize(particle.vLook) * CurLength.z;
|
||||
|
||||
}
|
||||
|
||||
//애니메이션 속도 , 인덱스
|
||||
|
||||
particleValue.vAniTime.x += fTimeDelta;
|
||||
|
||||
if (particleValue.vAniTime.x >= particleValue.vAniTime.y)
|
||||
{
|
||||
particleValue.vAniTime.x = 0.f;
|
||||
|
||||
particleValue.vAniIndex.x += 1.f;
|
||||
|
||||
if (particleValue.vAniIndex.x > particleValue.vAniIndex.y) // 애니메이션에 끝에 다다랐다면
|
||||
{
|
||||
particleValue.vAniIndex.x = 0.f; // 인덱스 초기화
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//마스킹 UV 움직임 시간
|
||||
|
||||
particleValue.vMaskingUVMoveTime.x += fTimeDelta;
|
||||
|
||||
if (particleValue.vMaskingUVMoveTime.x >= particleValue.vMaskingUVMoveTime.y)
|
||||
{
|
||||
particleValue.vMaskingUVMoveTime.x = 0.f;
|
||||
}
|
||||
|
||||
|
||||
//디퓨즈 UV 움직임
|
||||
|
||||
particleValue.vDiffuseUVMoveTime.x += fTimeDelta;
|
||||
|
||||
if (particleValue.vDiffuseUVMoveTime.x >= particleValue.vDiffuseUVMoveTime.y)
|
||||
{
|
||||
particleValue.vDiffuseUVMoveTime.x = 0.f;
|
||||
}
|
||||
|
||||
//노이즈 움직임
|
||||
particleValue.vNoiseUVMoveTime.x += fTimeDelta;
|
||||
|
||||
if (particleValue.vNoiseUVMoveTime.x >= particleValue.vNoiseUVMoveTime.y)
|
||||
{
|
||||
particleValue.vNoiseUVMoveTime.x = 0.f;
|
||||
}
|
||||
|
||||
particleValue.vDistortionUVMoveTime.x += fTimeDelta;
|
||||
|
||||
if (particleValue.vDistortionUVMoveTime.x >= particleValue.vDistortionUVMoveTime.y)
|
||||
{
|
||||
particleValue.vDistortionUVMoveTime.x = 0.f;
|
||||
}
|
||||
|
||||
|
||||
//아웃풋 대입
|
||||
|
||||
g_VBInstanceOutput[iIndex] = particle;
|
||||
g_ParticleValueOutput[iIndex] = particleValue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,606 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
Texture2D g_DepthTexture;
|
||||
|
||||
int g_iImageCountX;
|
||||
int g_iImageCountY;
|
||||
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
uint g_iQuestType;
|
||||
uint g_iSpellType;
|
||||
|
||||
float g_fPI;
|
||||
float g_fFar;
|
||||
float g_fTime;
|
||||
float g_fTimeMult;
|
||||
float g_fFrame;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
float g_fAlpha;
|
||||
float g_fOwnerAlpha;
|
||||
float g_fCanvasAlpha;
|
||||
float g_fAngle;
|
||||
float g_fCoolTime;
|
||||
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
|
||||
Texture2D g_Texture;
|
||||
Texture2D g_Texture1;
|
||||
Texture2D g_Texture2;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_Position;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vColor : SV_Target0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (Color.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_AlphaBlend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Clamp(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Cursor(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float4 White = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float2 UV = In.vTexcoord;
|
||||
float2 Center = float2(0.5f, 0.5f);
|
||||
|
||||
float CW = -g_fTime;
|
||||
float CCW = g_fTime;
|
||||
|
||||
float2 RedCircle = UV;
|
||||
float2 RedUV = UV - Center;
|
||||
|
||||
RedCircle.x = RedUV.x * cos(CCW) - RedUV.y * sin(CCW);
|
||||
RedCircle.y = RedUV.x * sin(CCW) + RedUV.y * cos(CCW);
|
||||
RedCircle = RedCircle + Center;
|
||||
|
||||
float2 BlueCircle = UV;
|
||||
float2 BlueUV = UV - Center;
|
||||
|
||||
BlueCircle.x = BlueUV.x * cos(CW) - BlueUV.y * sin(CW);
|
||||
BlueCircle.y = BlueUV.x * sin(CW) + BlueUV.y * cos(CW);
|
||||
BlueCircle = BlueCircle + Center;
|
||||
|
||||
|
||||
float4 Texture1 = g_Texture.Sample(ClampSampler, RedCircle);
|
||||
float4 Texture2 = g_Texture2.Sample(ClampSampler, BlueCircle);
|
||||
|
||||
if (Texture1.r >= 0.7f)
|
||||
Color = Texture1;
|
||||
|
||||
if (Texture2.b >= 0.7f)
|
||||
Color = Texture2;
|
||||
|
||||
if (all(Color.rgb <= 0.5f))
|
||||
discard;
|
||||
|
||||
Color = White;
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, uv);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 dir = uv - center;
|
||||
|
||||
float angle = atan2(dir.x, -dir.y);
|
||||
if (angle < 0)
|
||||
angle += g_fPI;
|
||||
|
||||
float rotation = saturate(g_fTime * g_fTimeMult) * g_fPI;
|
||||
|
||||
tex.rgb = (angle <= rotation) ? 1.0 : tex.rgb;
|
||||
|
||||
tex.a *= Alpha;
|
||||
|
||||
Out.vColor = tex;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Mission(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
tex1.a *= 0.5f;
|
||||
|
||||
if (tex1.a >= 0.f)
|
||||
Color = tex1;
|
||||
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 UV = In.vTexcoord;
|
||||
|
||||
int iTotalFrame = g_iImageCountX * g_iImageCountY;
|
||||
|
||||
uint iCurrentFrame = uint(floor(g_fTime / g_fFrame)) % iTotalFrame;
|
||||
|
||||
int iFrameX = iCurrentFrame % g_iImageCountX;
|
||||
int iFrameY = iCurrentFrame / g_iImageCountX;
|
||||
|
||||
float fFreamWidth = 1.0 / g_iImageCountX;
|
||||
float fFreamHeight = 1.0 / g_iImageCountY;
|
||||
|
||||
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth;
|
||||
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight;
|
||||
|
||||
float4 Texture = g_Texture.Sample(DefaultSampler, UV);
|
||||
|
||||
Color = Texture;
|
||||
|
||||
if (Color.r <= 0.4f)
|
||||
discard;
|
||||
|
||||
Color.a *= Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_QuestType(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
|
||||
float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_iQuestType == 0)
|
||||
{
|
||||
if (Texture1.r >= 0.3f)
|
||||
{
|
||||
Texture1.rgb = Color;
|
||||
}
|
||||
}
|
||||
|
||||
Texture1.a *= Alpha;
|
||||
Out.vColor = Texture1;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_UVMult(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
|
||||
color.a *= Alpha;
|
||||
Out.vColor = color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_NineSlice(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 CurrentPixelPosition = uv * g_fCurrent_Size;
|
||||
float OriginLeft = g_fNine_Slice.x;
|
||||
float OriginRight = g_fNine_Slice.y;
|
||||
float OriginTop = g_fNine_Slice.z;
|
||||
float OriginBottom = g_fNine_Slice.w;
|
||||
|
||||
float CurrentLeft = OriginLeft;
|
||||
float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
|
||||
float CurrentTop = OriginTop;
|
||||
float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
|
||||
|
||||
float2 Finaluv = In.vTexcoord;
|
||||
|
||||
if (CurrentPixelPosition.x < CurrentLeft)
|
||||
{
|
||||
Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
|
||||
}
|
||||
else if (CurrentPixelPosition.x > CurrentRight)
|
||||
{
|
||||
float dist = CurrentPixelPosition.x - CurrentRight;
|
||||
Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
|
||||
Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
|
||||
}
|
||||
|
||||
if (CurrentPixelPosition.y < CurrentTop)
|
||||
{
|
||||
Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
|
||||
}
|
||||
else if (CurrentPixelPosition.y > CurrentBottom)
|
||||
{
|
||||
float dist = CurrentPixelPosition.y - CurrentBottom;
|
||||
Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
|
||||
Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
|
||||
}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
|
||||
|
||||
tex1.a *= 0.5f;
|
||||
|
||||
if (tex1.a >= 0.f)
|
||||
Color = tex1;
|
||||
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
uv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Rotation);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
tex1.rgb *= 0.4f;
|
||||
color = tex1;
|
||||
tex2.rgb *= 0.3f;
|
||||
|
||||
if (tex2.a >= 0.9f)
|
||||
color = tex2;
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
return Out;
|
||||
|
||||
}
|
||||
|
||||
PS_OUT PS_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
uv *= sqrt(2.0f);
|
||||
float2 Rotation = In.vTexcoord;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, Rotation);
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_SpellAnim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
float3 BGColor = float3(1.f, 1.f, 1.f);
|
||||
|
||||
switch (g_iSpellType)
|
||||
{
|
||||
case 0:
|
||||
BGColor = float3(208.f, 179.f, 54.f) / 255.f;
|
||||
break;
|
||||
case 1:
|
||||
BGColor = float3(89.f, 32.f, 215.f) / 255.f;
|
||||
break;
|
||||
case 2:
|
||||
BGColor = float3(190.f, 46., 34.f) / 255.f;
|
||||
break;
|
||||
case 3:
|
||||
BGColor = float3(37.f, 129.f, 162.f) / 255.f;
|
||||
break;
|
||||
case 4:
|
||||
BGColor = float3(134.f, 171.f, 78.f) / 255.f;
|
||||
break;
|
||||
case 5:
|
||||
BGColor = float3(0.f, 80.f, 55.f) / 255.f;
|
||||
break;
|
||||
case 6:
|
||||
BGColor = float3(0.f, 0.f, 0.f);
|
||||
break;
|
||||
}
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
float CoolTime = 1.f - g_fDeltaV;
|
||||
float CoolTime2 = 1.f - g_fDeltaV + 0.05;
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, uv);
|
||||
tex1.rgb *= BGColor;
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, uv);
|
||||
|
||||
if (tex2.a >= 0.9f)
|
||||
tex1 = tex2;
|
||||
|
||||
color = tex1;
|
||||
|
||||
float wave1 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
float wave2 = sin(uv.x * 10.f + g_fTime * 2.f) * 0.01f;
|
||||
|
||||
float waveThreshold1 = CoolTime + wave1;
|
||||
float waveThreshold2 = CoolTime2 + wave2;
|
||||
|
||||
if (g_fDeltaV <= 1.f)
|
||||
{
|
||||
if (uv.y >= waveThreshold1 && uv.y <= waveThreshold2)
|
||||
{
|
||||
color.rgb = float3(1.f, 1.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (uv.y <= CoolTime)
|
||||
{
|
||||
color.a = 0.f;
|
||||
}
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass AlphaBlend
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_AlphaBlend();
|
||||
}
|
||||
|
||||
pass TextureClamp
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Clamp();
|
||||
}
|
||||
|
||||
pass Mouse_Cursor
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Cursor();
|
||||
}
|
||||
|
||||
pass Sptire_Sheet
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_UIBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Sptire_Sheet();
|
||||
}
|
||||
|
||||
pass Key_Hold_Rotation
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Key_Hold_Rotation();
|
||||
}
|
||||
|
||||
pass Mission
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Mission();
|
||||
}
|
||||
|
||||
pass QuestType
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_QuestType();
|
||||
}
|
||||
|
||||
pass UVMult
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_UVMult();
|
||||
}
|
||||
|
||||
pass NineSlice
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NineSlice();
|
||||
}
|
||||
|
||||
pass Rotation
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Rotation();
|
||||
}
|
||||
|
||||
pass Slot
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Slot();
|
||||
}
|
||||
|
||||
pass SpellAnim
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SpellAnim();
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,16 @@
|
||||
<ClInclude Include="..\Public\MapInfo.h">
|
||||
<Filter>03.InfoInstance\02.MapInfo</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Player.h">
|
||||
<ClInclude Include="..\public\LoadingWidget.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Loading_Panel.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Player.h">
|
||||
<Filter>02.GameObjects\Player</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Wand.h">
|
||||
@@ -287,6 +296,27 @@
|
||||
<Filter Include="03.InfoInstance\02.MapInfo">
|
||||
<UniqueIdentifier>{413e6692-6e4a-4b00-8306-edf652bd876a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas">
|
||||
<UniqueIdentifier>{c152f9ff-2525-4b4b-938c-5818f8d65a40}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Action_Panel">
|
||||
<UniqueIdentifier>{b819d017-f55f-4e1d-9c09-127a00b7ff57}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Loding_Panel">
|
||||
<UniqueIdentifier>{7f5280a9-3955-40ab-bde5-ef52acc0512f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\MiniMap_Panel">
|
||||
<UniqueIdentifier>{4791d5ef-35cd-494d-8c39-bcca14488323}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Mission_Panel">
|
||||
<UniqueIdentifier>{9d92d05f-697c-4437-a44a-b82e54255bcc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget">
|
||||
<UniqueIdentifier>{f19404dc-7bc1-4d89-9c4a-72959db5a701}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget_Flame">
|
||||
<UniqueIdentifier>{f7f22fc0-0e66-4e6e-a60a-0c612d58d802}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="80.State">
|
||||
<UniqueIdentifier>{be963729-ed65-4506-82f2-24213f5ecf5a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -406,6 +436,15 @@
|
||||
<ClCompile Include="..\Private\MapInfo.cpp">
|
||||
<Filter>03.InfoInstance\02.MapInfo</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\LoadingWidget.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel\LoadingWidget</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Loading_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Loding_Panel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Player.cpp">
|
||||
<Filter>02.GameObjects\Player</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
#include "pch.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "GameInstance.h"
|
||||
//#include "Mission_Panel.h"
|
||||
//#include "MiniMap_Panel.h"
|
||||
#include "Loading_Panel.h"
|
||||
//#include "Action_Panel.h"
|
||||
//#include "Mouse_Cursor.h"
|
||||
|
||||
CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CCanvasObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CGamePlay_Canvas::CGamePlay_Canvas(const CGamePlay_Canvas& rhs)
|
||||
:CCanvasObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGamePlay_Canvas::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGamePlay_Canvas::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 1920.f;
|
||||
Desc.fSizeY = 1080.f;
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Panel(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_bVisible = true;
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CGamePlay_Canvas::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CGamePlay_Canvas::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CGamePlay_Canvas::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGamePlay_Canvas::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoading_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoading_Panel**>(&m_pLoading_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("LoadingPanel"), m_pLoading_Panel);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMiniMap_Panel**>(&m_pMinimap_Panel))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Panel(TEXT("MinimapPanel"), m_pMinimap_Panel);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Panel**>(&m_pMission_Panel))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Panel(TEXT("MissionPanel"), m_pMission_Panel);
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CAction_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CAction_Panel**>(&m_pAction_Panel))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Panel(TEXT("ActionPanel"), m_pAction_Panel);
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Clear_Penel()
|
||||
{
|
||||
}
|
||||
|
||||
CGamePlay_Canvas* CGamePlay_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CGamePlay_Canvas* pInstance = new CGamePlay_Canvas(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CGamePlay_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CGamePlay_Canvas::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CGamePlay_Canvas* pInstance = new CGamePlay_Canvas(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CGamePlay_Canvas");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pLoading_Panel);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CGamePlay_Canvas::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "Light_Main.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
#include "SkyBox.h"
|
||||
@@ -84,6 +85,10 @@ HRESULT CLevel_GamePlay::Ready_Lights()
|
||||
|
||||
HRESULT CLevel_GamePlay::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CGamePlay_Canvas>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_UI))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include "MainApp.h"
|
||||
#include "Light_Main.h"
|
||||
#include "Camera_Debug.h"
|
||||
//#include "GamePlay_Canvas.h"
|
||||
//#include "Loading_Panel.h"
|
||||
//#include "LoadingWidget.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "Camera_Gaze.h"
|
||||
@@ -118,6 +121,11 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("LoadingWidget"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Loading/LoadingWidget.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_MESH,
|
||||
@@ -134,6 +142,14 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIEDITOR,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// Heavy Wall
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
@@ -184,12 +200,20 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
//if (FAILED(m_pGameInstance->Add_Prototype<CGamePlay_Canvas>(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Add_Prototype<CLoading_Panel>(g_iStaticLevel, CLoading_Panel::Create(m_pDevice, m_pContext)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Add_Prototype<CLoadingWidget>(g_iStaticLevel, CLoadingWidget::Create(m_pDevice, m_pContext)))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
/* For.Prototype_GameObject_SkyBox */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSkyBox>(g_iStaticLevel, CSkyBox::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
#include "pch.h"
|
||||
#include "LoadingWidget.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CLoadingWidget::CLoadingWidget(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CLoadingWidget::CLoadingWidget(const CLoadingWidget& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLoadingWidget::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoadingWidget::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 200.f;
|
||||
Desc.fSizeY = 200.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_iImageFrameX = 6;
|
||||
m_iImageFrameY = 6;
|
||||
m_fFrame = 0.2f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fDelayTime = 1.f;
|
||||
m_fEndTime = 1.8f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fMoveSpeed = 10.f;
|
||||
m_bVisible = true;
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLoadingWidget::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CLoadingWidget::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
if (m_bLerpOn == true)
|
||||
{
|
||||
Start_Lerp(m_fMoveSpeed);
|
||||
}
|
||||
|
||||
if (m_bLerpOff == true)
|
||||
{
|
||||
Reset_Pos(m_fMoveSpeed);
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CLoadingWidget::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CLoadingWidget::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::LODING)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CLoadingWidget::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CLoadingWidget::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFrame", &m_fFrame, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountX", &m_iImageFrameX, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iImageCountY", &m_iImageFrameY, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoadingWidget::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::STATIC), TEXT("LoadingWidget"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoadingWidget* CLoadingWidget::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLoadingWidget* pInstance = new CLoadingWidget(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLoadingWidget");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CLoadingWidget::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLoadingWidget* pInstance = new CLoadingWidget(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLoadingWidget");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLoadingWidget::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CLoadingWidget::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
#include "pch.h"
|
||||
#include "Loading_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "LoadingWidget.h"
|
||||
//#include "LoadingWidget_Flame.h"
|
||||
|
||||
CLoading_Panel::CLoading_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CLoading_Panel::CLoading_Panel(const CLoading_Panel& rhs)
|
||||
:CPanelObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 1200.f;
|
||||
Desc.fY = 900.f;
|
||||
Desc.fSizeX = 1515.f;
|
||||
Desc.fSizeY = 300.f;
|
||||
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Element(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
m_bVisible = true;
|
||||
m_bActive = true;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CLoading_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CLoading_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CLoading_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CLoading_Panel::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Bind_ShaderResources()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget**>(&m_pLoadingWidget))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget);
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget_Flame>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CLoadingWidget_Flame**>(&m_pLoadingWidget_Flame))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//Add_Element(TEXT("LoadingWidget_Flame"), m_pLoadingWidget_Flame);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoading_Panel* CLoading_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLoading_Panel* pInstance = new CLoading_Panel(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLoading_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CLoading_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CLoading_Panel* pInstance = new CLoading_Panel(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLoading_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLoading_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CLoading_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "CanvasObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CGamePlay_Canvas final : public CCanvasObject
|
||||
{
|
||||
private:
|
||||
CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CGamePlay_Canvas(const CGamePlay_Canvas& rhs);
|
||||
virtual ~CGamePlay_Canvas() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Panel(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Clear_Penel();
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMission_Panel = { nullptr };
|
||||
CGameObject* m_pMinimap_Panel = { nullptr };
|
||||
CGameObject* m_pLoading_Panel = { nullptr };
|
||||
CGameObject* m_pAction_Panel = { nullptr };
|
||||
|
||||
public:
|
||||
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLoadingWidget final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CLoadingWidget(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLoadingWidget(const CLoadingWidget& rhs);
|
||||
virtual ~CLoadingWidget() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iImageFrameX{};
|
||||
_int m_iImageFrameY{};
|
||||
_float m_fFrame{};
|
||||
public:
|
||||
static CLoadingWidget* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "PanelObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CLoading_Panel final : public CPanelObject
|
||||
{
|
||||
private:
|
||||
CLoading_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLoading_Panel(const CLoading_Panel& rhs);
|
||||
virtual ~CLoading_Panel() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pLoadingWidget = { nullptr };
|
||||
CGameObject* m_pLoadingWidget_Flame = { nullptr };
|
||||
|
||||
|
||||
public:
|
||||
static CLoading_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3608,4 +3608,158 @@
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="Street_Main">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_Hogshead</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_A</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_B</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stairwalls_3Broomsticks</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_LowerHiStreet_Zonkos</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_AA_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_AA_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_BB_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_BB_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_CC_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_CC_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_DD_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_DD_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_EE_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_EE_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_FF_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_FF_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_GG_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_GG_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_HH_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_HH_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
</Land>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -181,5 +181,88 @@ float3 DecodeNormalFromRG(Texture2D NormalMap, SamplerState Samp, float2 uv)
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
float4x4 RotateX(float fAngle)
|
||||
{
|
||||
float fCos = cos(radians(fAngle));
|
||||
float fSin = sin(radians(fAngle));
|
||||
|
||||
float4x4 RotateXMat =
|
||||
{
|
||||
1, 0, 0, 0,
|
||||
0, fCos, -fSin, 0,
|
||||
0, fSin, fCos, 0,
|
||||
0, 0, 0, 1,
|
||||
};
|
||||
|
||||
return RotateXMat;
|
||||
}
|
||||
|
||||
float4x4 RotateY(float fAngle)
|
||||
{
|
||||
float fCos = cos(radians(fAngle));
|
||||
float fSin = sin(radians(fAngle));
|
||||
|
||||
float4x4 RotateYMat =
|
||||
{
|
||||
fCos , 0, fSin, 0,
|
||||
0 , 1, 0, 0,
|
||||
-fSin , 0, fCos, 0,
|
||||
0 , 0, 0, 1
|
||||
};
|
||||
|
||||
return RotateYMat;
|
||||
}
|
||||
|
||||
float4x4 RotateZ(float fAngle)
|
||||
{
|
||||
float fCos = cos(radians(fAngle));
|
||||
float fSin = sin(radians(fAngle));
|
||||
|
||||
float4x4 RotateZMat =
|
||||
{
|
||||
fCos, -fSin, 0, 0,
|
||||
fSin, fCos, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1,
|
||||
};
|
||||
|
||||
return RotateZMat;
|
||||
}
|
||||
|
||||
float4x4 RotateAxis(float4 _vAxis , float fAngle)
|
||||
{
|
||||
float flenhth = length(_vAxis);
|
||||
if (flenhth < FLT_EPSILON5)
|
||||
{
|
||||
return float4x4(
|
||||
1.0, 0.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
);
|
||||
}
|
||||
|
||||
float3 vAxis = normalize(_vAxis);
|
||||
|
||||
float fCos = cos(radians(fAngle));
|
||||
float fSin = sin(radians(fAngle));
|
||||
|
||||
float fX = vAxis.x;
|
||||
float fY = vAxis.y;
|
||||
float fZ = vAxis.z;
|
||||
|
||||
//Rodrigues 공식 기반
|
||||
float4x4 RotateMat =
|
||||
float4x4(
|
||||
fCos + fX * fX * (1.0 - fCos), fX * fY * (1.0 - fCos) - fZ * fSin, fX * fZ * (1.0 - fCos) + fY * fSin, 0.0,
|
||||
fY * fX * (1.0 - fCos) + fZ * fSin, fCos + fY * fY * (1.0 - fCos), fY * fZ * (1.0 - fCos) - fX * fSin, 0.0,
|
||||
fZ * fX * (1.0 - fCos) - fY * fSin, fZ * fY * (1.0 - fCos) + fX * fSin, fCos + fZ * fZ * (1.0 - fCos), 0.0,
|
||||
0.0, 0.0, 0.0, 1.0
|
||||
);
|
||||
|
||||
return RotateMat;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // ENGINE_SHADER_FUNCTIONS_HLSLI
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
float PI = 3.141592;
|
||||
#include "Engine_Shader_Functions.hlsli"
|
||||
|
||||
struct Particle
|
||||
{
|
||||
@@ -30,7 +29,15 @@ struct ParticleValue
|
||||
float2 vAniIndex;
|
||||
float fGravity;
|
||||
|
||||
float3 vSinAmount;
|
||||
float3 vSinAmount;
|
||||
float3 vDeltaAngle;
|
||||
float3 vDeltaAxisAngle;
|
||||
|
||||
float fDrag;
|
||||
float3 vPivot;
|
||||
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
};
|
||||
|
||||
|
||||
@@ -48,6 +55,11 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
|
||||
bool isDrop;
|
||||
bool isMoveForward;
|
||||
bool isSinWave;
|
||||
|
||||
bool isTurn;
|
||||
bool isAxisTurn;
|
||||
bool isPivotMove;
|
||||
bool isSizeMove;
|
||||
|
||||
float fTimeDelta;
|
||||
float fPadding1; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
|
||||
@@ -74,9 +86,7 @@ void CS_MAIN(
|
||||
{
|
||||
if (isLoop == false)
|
||||
{
|
||||
|
||||
|
||||
return;
|
||||
return ;
|
||||
}
|
||||
|
||||
//초기화
|
||||
@@ -86,15 +96,45 @@ void CS_MAIN(
|
||||
particle.vTranslation = particleValue.vOriginTranslation;
|
||||
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particleValue.vAniIndex.x = 0.f;
|
||||
|
||||
|
||||
g_VBInstanceOutput[iIndex] = particle;
|
||||
g_ParticleValueOutput[iIndex] = particleValue;
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
if (isMoveForward)
|
||||
{
|
||||
float4 vVelocity = vector(normalize(particleValue.vOriginLook.xyz) * particleValue.fSpeed, 1.f);
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float fRatio = 1 - (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(normalize(particle.vLook.xyz) * particleValue.fSpeed, 1.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta;
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
}
|
||||
|
||||
if (isPivotMove)
|
||||
{
|
||||
float3 vDir = normalize(particleValue.vPivot - particleValue.vOriginTranslation.xyz);
|
||||
|
||||
float fDrag = particleValue.fDrag;
|
||||
|
||||
if (particleValue.fDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
float4 vVelocity = vector(vDir * particleValue.fSpeed, 1.f);
|
||||
|
||||
particle.vTranslation += vVelocity * fTimeDelta * fDrag;
|
||||
|
||||
}
|
||||
|
||||
if (isDrop == true)
|
||||
@@ -107,6 +147,86 @@ void CS_MAIN(
|
||||
{
|
||||
particle.vTranslation += vector( sin(particle.vLifeTime.x * 3.141592 * 2.f) * particleValue.vSinAmount, 0.f);
|
||||
}
|
||||
|
||||
if (isTurn == true)
|
||||
{
|
||||
/* ROTATE */
|
||||
float4x4 RotateXMat = RotateX(particleValue.vDeltaAngle.x * fTimeDelta);
|
||||
float4x4 RotateYMat = RotateY(particleValue.vDeltaAngle.y * fTimeDelta);
|
||||
float4x4 RotateZMat = RotateZ(particleValue.vDeltaAngle.z * fTimeDelta);
|
||||
|
||||
|
||||
float4x4 CombinedRotMat = mul(RotateZMat, mul(RotateYMat, RotateXMat));
|
||||
|
||||
float4x4 CurRotatemat = {particle.vRight, particle.vUp, particle.vLook, vector(0.f , 0.f, 0.f, 1.f)};
|
||||
|
||||
|
||||
|
||||
CurRotatemat = mul(CombinedRotMat, CurRotatemat);
|
||||
|
||||
particle.vRight = CurRotatemat[0].xyzw;
|
||||
particle.vUp = CurRotatemat[1].xyzw;
|
||||
particle.vLook = CurRotatemat[2].xyzw;
|
||||
|
||||
}
|
||||
|
||||
if (isAxisTurn)
|
||||
{
|
||||
float4x4 RotateAxisRightMat = RotateAxis(particle.vRight, particleValue.vDeltaAxisAngle.x * fTimeDelta);
|
||||
float4x4 RotateAxisUpMat = RotateAxis(particle.vUp, particleValue.vDeltaAxisAngle.y * fTimeDelta);
|
||||
float4x4 RotateAxisLookMat = RotateAxis(particle.vLook, particleValue.vDeltaAxisAngle.z * fTimeDelta);
|
||||
|
||||
|
||||
float4x4 CombinedRotMat = mul(RotateAxisLookMat, mul(RotateAxisUpMat, RotateAxisRightMat));
|
||||
|
||||
float4x4 CurRotatemat = { particle.vRight, particle.vUp, particle.vLook, vector(0.f, 0.f, 0.f, 1.f) };
|
||||
|
||||
|
||||
CurRotatemat = mul(CurRotatemat ,CombinedRotMat);
|
||||
|
||||
particle.vRight = CurRotatemat[0].xyzw;
|
||||
particle.vUp = CurRotatemat[1].xyzw;
|
||||
particle.vLook = CurRotatemat[2].xyzw;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (isSizeMove == true)
|
||||
{
|
||||
float3 CurLength =
|
||||
{
|
||||
length(particle.vRight),
|
||||
length(particle.vUp),
|
||||
length(particle.vLook),
|
||||
};
|
||||
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
float fRatio = 1 - (1 - fTime * fTime);
|
||||
|
||||
float fDrag = particleValue.fSizeDrag;
|
||||
|
||||
if (particleValue.fSizeDrag < FLT_EPSILON5)
|
||||
fDrag = 1;
|
||||
|
||||
//fDrag *= fRatio;
|
||||
|
||||
CurLength += particleValue.vDeltaSize * fTimeDelta * fDrag;
|
||||
|
||||
if (CurLength.x < FLT_EPSILON5)
|
||||
CurLength.x = FLT_EPSILON5;
|
||||
|
||||
if (CurLength.y < FLT_EPSILON5)
|
||||
CurLength.y = FLT_EPSILON5;
|
||||
|
||||
if (CurLength.z < FLT_EPSILON5)
|
||||
CurLength.z = FLT_EPSILON5;
|
||||
|
||||
particle.vRight = normalize(particle.vRight) * CurLength.x;
|
||||
particle.vUp = normalize(particle.vUp) * CurLength.y;
|
||||
particle.vLook = normalize(particle.vLook) * CurLength.z;
|
||||
|
||||
}
|
||||
|
||||
//애니메이션 속도 , 인덱스
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
}
|
||||
}
|
||||
|
||||
if (uv.y <= CoolTime)
|
||||
if (uv.y <= CoolTime)
|
||||
{
|
||||
color.a = 0.f;
|
||||
}
|
||||
@@ -472,6 +472,71 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_HpBar(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 CurrentPixelPosition = uv * g_fCurrent_Size;
|
||||
float OriginLeft = g_fNine_Slice.x;
|
||||
float OriginRight = g_fNine_Slice.y;
|
||||
float OriginTop = g_fNine_Slice.z;
|
||||
float OriginBottom = g_fNine_Slice.w;
|
||||
|
||||
float CurrentLeft = OriginLeft;
|
||||
float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight);
|
||||
float CurrentTop = OriginTop;
|
||||
float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom);
|
||||
|
||||
float2 Finaluv = In.vTexcoord;
|
||||
|
||||
if (CurrentPixelPosition.x < CurrentLeft)
|
||||
{
|
||||
Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
|
||||
}
|
||||
else if (CurrentPixelPosition.x > CurrentRight)
|
||||
{
|
||||
float dist = CurrentPixelPosition.x - CurrentRight;
|
||||
Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
|
||||
Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
|
||||
}
|
||||
|
||||
if (CurrentPixelPosition.y < CurrentTop)
|
||||
{
|
||||
Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
|
||||
}
|
||||
else if (CurrentPixelPosition.y > CurrentBottom)
|
||||
{
|
||||
float dist = CurrentPixelPosition.y - CurrentBottom;
|
||||
Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
|
||||
Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
|
||||
}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
|
||||
float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
|
||||
|
||||
|
||||
Color = tex1;
|
||||
|
||||
tex2.rgb *= float3(112.f, 241.f, 31.f) / 255.f;
|
||||
|
||||
if(Color.r >= 0.01f)
|
||||
Color = tex2;
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -603,4 +668,13 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_SpellAnim();
|
||||
}
|
||||
pass HpBar
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_HpBar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,9 @@ struct VS_IN
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
|
||||
float2 vSize : TEXCOORD1;
|
||||
float2 Pos : TEXCOORD2;
|
||||
float2 vPos : TEXCOORD2;
|
||||
float2 vUVStart : TEXCOORD3;
|
||||
float2 vUVEnd: TEXCOORD4;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
@@ -30,17 +32,17 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matVP = mul(g_ViewMatrix, g_ProjMatrix);
|
||||
|
||||
float3 vLocalPos = In.vPosition;
|
||||
vLocalPos.xy *= In.vSize;
|
||||
vLocalPos.xy += In.Pos;
|
||||
|
||||
vLocalPos.xy += In.vPos;
|
||||
float2 StartUV = In.vUVStart;
|
||||
float2 EndUV = In.vUVEnd;
|
||||
float3 vParentPos = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43);
|
||||
|
||||
float3 vFinalWorldPos = vLocalPos + vParentPos;
|
||||
|
||||
Out.vPosition = mul(float4(vFinalWorldPos, 1.f), matVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vTexcoord = StartUV + In.vTexcoord * (EndUV - StartUV);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -78,6 +80,23 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Alpha_Blend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, In.vTexcoord);
|
||||
|
||||
if(color.a <= 0.4f)
|
||||
discard;
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -90,4 +109,15 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass AlphaBlend
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Alpha_Blend();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,19 @@ struct ParticleValue
|
||||
float2 vAniTime;
|
||||
|
||||
float2 vAniIndex;
|
||||
float fGravity;
|
||||
|
||||
float3 vSinAmount;
|
||||
float3 vDeltaAngle;
|
||||
float3 vDeltaAxisAngle;
|
||||
|
||||
float fDrag;
|
||||
float3 vPivot;
|
||||
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +81,16 @@ float g_fBlurIntensity; //블러 세기
|
||||
float g_fNoiseDistortionIntensity; // 디스토션 왜곡 세기
|
||||
|
||||
float4 g_vEmissive;
|
||||
float g_fEmissiveCutAlpha;
|
||||
float g_fEmissiveStrength;
|
||||
|
||||
float g_fSoftenExp;
|
||||
float g_fSoftStrength;
|
||||
float g_fCoreBoost;
|
||||
float g_fRadius;
|
||||
|
||||
|
||||
float g_fSoftMaskEdge;
|
||||
float g_fSoftMask;
|
||||
|
||||
bool g_isDiffuse;
|
||||
bool g_isMasking;
|
||||
@@ -83,6 +105,11 @@ bool g_isNoiseUVMove;
|
||||
|
||||
bool g_isReverseDissolve;
|
||||
bool g_isEmissiveDissolve;
|
||||
bool g_isMaskClampSample;
|
||||
|
||||
bool g_isNoiseColor;
|
||||
bool g_isNoiseAlpha;
|
||||
bool g_isNomalDissolve;
|
||||
|
||||
float g_fFar;
|
||||
|
||||
@@ -161,7 +188,7 @@ VS_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
|
||||
matrix matW, matWV, matWVP;
|
||||
|
||||
matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
@@ -230,6 +257,7 @@ PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
|
||||
float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
@@ -277,7 +305,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
vector vMtrlDissolve;
|
||||
vector vMtrlDistortion;
|
||||
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
|
||||
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
|
||||
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
|
||||
@@ -287,7 +315,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex));
|
||||
|
||||
if (g_isDiffuseUVMove)
|
||||
{
|
||||
@@ -334,13 +362,18 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
|
||||
if(g_isNoise)
|
||||
{
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
|
||||
float2 vNoiseUV = In.vTexcoord;
|
||||
|
||||
if (g_isNoiseUVMove == true)
|
||||
vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
if (g_isNoiseAlpha)
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
|
||||
vMtrlDiffuse *= vMtrlNoise;
|
||||
if (g_isNoiseColor)
|
||||
vMtrlDiffuse *= vMtrlNoise;
|
||||
}
|
||||
|
||||
/* 마스크 */
|
||||
@@ -348,7 +381,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
float2 vMaskTexcoord = In.vTexcoord;
|
||||
|
||||
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
|
||||
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex));
|
||||
|
||||
// 마스크 디스토션
|
||||
if (g_isDistortion == true)
|
||||
@@ -370,52 +403,52 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||
}
|
||||
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
|
||||
if (g_isMaskClampSample == true)
|
||||
vMtrlMask = g_MaskingTexture.Sample(ClampSampler, vMaskTexcoord);
|
||||
else
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||
float fSoftMask;
|
||||
|
||||
|
||||
if (g_fSoftMask > FLT_EPSILON5)
|
||||
fSoftMask = saturate((vMtrlMask.r - g_fSoftMaskEdge) * g_fSoftMask);
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * fSoftMask);
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.f)
|
||||
discard;
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if(g_isReverseDissolve == true)
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_isReverseDissolve == true)
|
||||
{
|
||||
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f ,0.f ,0.f ,0.f);
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
|
||||
|
||||
int2 iTexel = int2(In.vPosition.xy);
|
||||
@@ -430,21 +463,40 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
|
||||
float fEmissiveCutAlpha = g_fEmissiveCutAlpha;
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
float fMaskAlpha = vMtrlMask.a;
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveCutAlpha += (In.vLifeTime.x / In.vLifeTime.y) / 2;
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
|
||||
float fSmoothAlpha = smoothstep(fEmissiveCutAlpha - 0.1f, fEmissiveCutAlpha + 0.1f, vMtrlDiffuse.a);
|
||||
|
||||
|
||||
|
||||
float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a);
|
||||
|
||||
Out.vColorTarget = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);
|
||||
|
||||
Out.vColorTarget = vEmissiveMtrl * fEmissive * fEmissiveStrength; // 이미시브 스트랭스
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -563,13 +615,18 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
if (g_isNoise)
|
||||
{
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
|
||||
float2 vNoiseUV = In.vTexcoord;
|
||||
|
||||
if(g_isNoiseUVMove == true)
|
||||
vNoiseUV = In.vTexcoord + SelectLerpUV(g_vNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
if (g_isNoiseAlpha)
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlNoise.r);
|
||||
|
||||
vMtrlDiffuse *= vMtrlNoise;
|
||||
if (g_isNoiseColor)
|
||||
vMtrlDiffuse *= vMtrlNoise;
|
||||
}
|
||||
|
||||
/* 마스크 */
|
||||
@@ -599,7 +656,10 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||
}
|
||||
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
if (g_isMaskClampSample == true)
|
||||
vMtrlMask = g_MaskingTexture.Sample(ClampSampler, vMaskTexcoord);
|
||||
else
|
||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||
|
||||
}
|
||||
else
|
||||
@@ -607,47 +667,84 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
vMtrlMask.r = 1.f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||
float softMask = saturate((vMtrlMask.r - 0.1) * 1.0);
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * softMask);
|
||||
|
||||
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.f)
|
||||
discard;
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_isReverseDissolve == true)
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (g_isReverseDissolve == true)
|
||||
{
|
||||
if (vMtrlDissolve.r >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vector vEmissive;
|
||||
|
||||
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float fSmoothAlpha = smoothstep(g_fEmissiveCutAlpha - 0.02f, g_fEmissiveCutAlpha + 0.02f, vMtrlDiffuse.a);
|
||||
|
||||
float3 vEmissiveColor = g_vEmissive.rgb * g_vEmissive.a + vEmissiveMtrl.rgb * (1 - g_vEmissive.a);
|
||||
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
|
||||
vEmissive = vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);
|
||||
float fDistance = saturate(length(CenteredUV) / g_fRadius); // 마스크의 크기를 어느정도할지
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity + vEmissive;
|
||||
float fMaskAlpha = vMtrlMask.a;
|
||||
|
||||
float fSoftEdge = pow(saturate(1.0f - fDistance), g_fSoftenExp) * g_fSoftStrength; //SoftenExp 엣지감쇠지수 , Strength
|
||||
|
||||
float fCore = pow(saturate(1.0 - fDistance * 2.f), max(0.001, g_fCoreBoost)) * g_fCoreBoost; // CoreBust 중심강조
|
||||
|
||||
float fEmissive = fSoftEdge + fCore;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
else
|
||||
{
|
||||
vEmissiveMtrl = g_vEmissive;
|
||||
}
|
||||
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
|
||||
if (g_isEmissiveDissolve == true)
|
||||
{
|
||||
fEmissiveStrength *= (1.f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
|
||||
vEmissiveMtrl = vEmissiveMtrl * fEmissive * fEmissiveStrength;
|
||||
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity + vEmissiveMtrl.rgb, vMtrlDiffuse.a); /** vector(vEmissiveColor * fSmoothAlpha, vMtrlDiffuse.a);*/
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,15 @@
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fUsingSurfaceParams;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_SurfaceParamsTexture;
|
||||
Texture2D g_DiffuseTextures[2];
|
||||
Texture2D g_NormalTextures[2];
|
||||
Texture2D g_SurfaceParamsTextures[2];
|
||||
Texture2D g_MaskTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -51,24 +58,53 @@ struct PS_IN
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float2 tileUV = In.vWorldPos.xz / 64.f;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord * 30.f);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
vector vMask = g_MaskTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vMtrlDiffuse_0 = g_DiffuseTextures[0].Sample(DefaultSampler, tileUV);
|
||||
vector vMtrlDiffuse_1 = g_DiffuseTextures[1].Sample(DefaultSampler, tileUV);
|
||||
|
||||
vector vMtrlDiffuse = lerp(vMtrlDiffuse_0, vMtrlDiffuse_1, vMask.r);
|
||||
|
||||
vector vSurface_0 = g_SurfaceParamsTextures[0].Sample(DefaultSampler, tileUV);
|
||||
vector vSurface_1 = g_SurfaceParamsTextures[1].Sample(DefaultSampler, tileUV);
|
||||
|
||||
vector vSurface = lerp(vSurface_0, vSurface_1, vMask.r);
|
||||
|
||||
float3 vNormalDecoded_0 = DecodeNormalFromRG(g_NormalTextures[0], DefaultSampler, tileUV);
|
||||
float3 vNormalDecoded_1 = DecodeNormalFromRG(g_NormalTextures[0], DefaultSampler, tileUV);
|
||||
|
||||
float3 vNormalDecoded = normalize(lerp(vNormalDecoded_0, vNormalDecoded_1, vMask.r));
|
||||
|
||||
float3 vBinormal = cross(In.vNormal.xyz, float3(1.f, 0.f, 0.f));
|
||||
|
||||
float3 vTangent = cross(vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3x3 WorldMatrix = float3x3(vTangent, vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vNormal = float4(In.vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.0f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 795 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -90,6 +90,6 @@ MobileBaseTexture = None
|
||||
MobileNormalTexture = None
|
||||
bUseMobileSpecular = false
|
||||
MobileSpecularPower = 16
|
||||
MobileSpecularMask = MSM_Constant (0)
|
||||
MobileSpecularMask = MSM_Constant (0)6
|
||||
MobileMaskTexture = None
|
||||
TextureStreamingData[0] = {}
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
<ClInclude Include="..\Public\Dummy_PhysXWall.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Plane.h" />
|
||||
<ClInclude Include="..\Public\Dummy_PhysXPlayable.h" />
|
||||
<ClInclude Include="..\public\HpBarBG.h" />
|
||||
<ClInclude Include="..\Public\NomalJap.h" />
|
||||
<ClInclude Include="..\Public\Effect_Container.h" />
|
||||
<ClInclude Include="..\public\GamePlay_Canvas.h" />
|
||||
@@ -328,6 +329,7 @@
|
||||
<ClCompile Include="..\Private\Dummy_PhysXWall.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Plane.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_PhysXPlayable.cpp" />
|
||||
<ClCompile Include="..\private\HpBarBG.cpp" />
|
||||
<ClCompile Include="..\Private\NomalJap.cpp" />
|
||||
<ClCompile Include="..\Private\Effect_Container.cpp" />
|
||||
<ClCompile Include="..\private\GamePlay_Canvas.cpp" />
|
||||
|
||||
@@ -298,6 +298,9 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Slot_Number">
|
||||
<UniqueIdentifier>{0db597d8-c4e7-479a-9b7e-9014b79a5e03}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\HPBarBG">
|
||||
<UniqueIdentifier>{7e8b7123-11fb-4946-99fe-3265932d0536}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Camera">
|
||||
<UniqueIdentifier>{072a4e85-ba07-4ffd-bdb1-ddac02558242}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -645,6 +648,9 @@
|
||||
<ClInclude Include="..\public\Slot_Number.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Slot_Number</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\HpBarBG.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\HPBarBG</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera_Gaze.h">
|
||||
<Filter>02.GameObjects\Camera\Camera_Gaze</Filter>
|
||||
</ClInclude>
|
||||
@@ -961,6 +967,9 @@
|
||||
<ClCompile Include="..\private\Slot_Number.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Slot_Number</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\HpBarBG.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\HPBarBG</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera_Gaze.cpp">
|
||||
<Filter>02.GameObjects\Camera\Camera_Gaze</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "Spell_Slot.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "Spell_Overlay.h"
|
||||
#include "Slot_Number.h"
|
||||
#include "HpBarBG.h"
|
||||
|
||||
CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -105,45 +107,11 @@ _vector CAction_Panel::Get_WorldPostion()
|
||||
|
||||
HRESULT CAction_Panel::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CAction_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -159,13 +127,23 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellImage"), m_pSpell_Image);
|
||||
Add_Element(TEXT("Spell_Image"), m_pSpell_Image);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Overlay>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Overlay**>(&m_pSpell_Overlay))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("SpellOverlay"), m_pSpell_Overlay);
|
||||
Add_Element(TEXT("Spell_Overlay"), m_pSpell_Overlay);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSlot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSlot_Number**>(&m_pSlot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Slot_Number"), m_pSlot_Number);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CHpBarBG>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CHpBarBG**>(&m_pHpBarBG))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("HpBarBG"), m_pHpBarBG);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,9 +110,7 @@ void CActive_Icon::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,10 +148,10 @@ void CBuildingContainer::Describe_Entity()
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
/*if (nullptr != pTerrain)
|
||||
if (nullptr != pTerrain)
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
|
||||
}*/
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>()->Get_XMWorldMatrix(), &m_vPosition);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
|
||||
@@ -40,10 +40,7 @@ void CDummySkyBox::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CDummySkyBox::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef 기무리
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object<CCamera_Gaze>()->Get_WorldPostion());
|
||||
#endif // 기무리
|
||||
#ifndef 기무리
|
||||
#ifdef gimch
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object<CDebugCamera>()->Get_WorldPostion());
|
||||
#endif // !기무리
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ HRESULT CDummy_Cube::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::SKYBOX)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "GameInstance.h"
|
||||
#include "NomalJap.h"
|
||||
|
||||
#include "TrailObject.h"
|
||||
|
||||
CDummy_PhysXPlayable::CDummy_PhysXPlayable(ID3D11Device* pDevice, ID3D11DeviceContext* pContext):
|
||||
CGameObject(pDevice, pContext)
|
||||
{
|
||||
@@ -113,6 +115,16 @@ HRESULT CDummy_PhysXPlayable::Initialize(void* pArg)
|
||||
m_pCallBack_Behavior->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
m_pCallBack_HitReport->Initialize(m_pCharacter_Controller, m_pRigidBody);
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
|
||||
PartsDesc.pParentTransform = m_pTransformCom;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTrailObject>(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, LAYER_HITBOX, &PartsDesc, this))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
|
||||
void CEditEffect::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
//if (m_bVisible == false)
|
||||
// return;
|
||||
|
||||
if (m_pInstance_ModelCom == nullptr)
|
||||
return;
|
||||
@@ -433,11 +433,17 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat("EmissiveCutAlpha", &m_EffectInfo.fEmissiveCutAlpha, 0.005f, 0.f, 1.f);
|
||||
GUI::DragFloat("EmissiveStrength", &m_EffectInfo.fEmissiveStrength, 0.005f, 0.f, 1.f);
|
||||
GUI::DragFloat("Radius", &m_EffectInfo.fRadius, 0.005f);
|
||||
GUI::DragFloat("CoreBoost", &m_EffectInfo.fCoreBoost, 0.005f);
|
||||
GUI::DragFloat("SoftStrength", &m_EffectInfo.fSoftStrength, 0.005f);
|
||||
GUI::DragFloat("SoftenExp", &m_EffectInfo.fSoftenExp, 0.005f);
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
||||
|
||||
|
||||
|
||||
GUI::Checkbox("EmissiveTex", &m_EffectInfo.isEmissive);
|
||||
GUI::Checkbox("EmissiveDissolve", &m_EffectInfo.isEmissiveDissolve);
|
||||
|
||||
@@ -573,9 +579,14 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::InputFloat2("MaskUVCutting", (_float*)&m_EffectInfo.vUVMaskCutting);
|
||||
GUI::Checkbox("MaskUVMove", &m_EffectInfo.isMaskUVMove);
|
||||
GUI::Checkbox("MaskClampSample", &m_EffectInfo.isMaskClampSample);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_EffectInfo.vMaskingUVGainAmount, 0.01f);
|
||||
GUI::Spacing();
|
||||
GUI::DragFloat("SoftMask", &m_EffectInfo.fSoftMask, 0.01f, 0.f);
|
||||
GUI::DragFloat("fSoftMaskEdge", &m_EffectInfo.fSoftMaskEdge, 0.01f, 0.f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
||||
@@ -614,7 +625,7 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("DISSOLV_TEX"))
|
||||
{
|
||||
|
||||
GUI::Checkbox("Nomal Dissolve", &m_EffectInfo.isNomalDissolve);
|
||||
GUI::Checkbox("Reverse Dissolve", &m_EffectInfo.isReverseDissolve);
|
||||
|
||||
_string strName = m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||
@@ -689,7 +700,8 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("NOISE"))
|
||||
{
|
||||
|
||||
GUI::Checkbox("NoiseColor", &m_EffectInfo.isNoiseColor);
|
||||
GUI::Checkbox("NoiseAlpha", &m_EffectInfo.isNoiseAlpha);
|
||||
GUI::Checkbox("NoiseMove", &m_EffectInfo.isNoiseUVMove);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
@@ -721,21 +733,22 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Begin("Simple Plot");
|
||||
|
||||
|
||||
ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100));
|
||||
|
||||
GUI::InputFloat("InputValue", &m_fInputValue);
|
||||
|
||||
if (GUI::Button("AddValue"))
|
||||
{
|
||||
m_ValueVector.push_back(m_fInputValue);
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
||||
}
|
||||
|
||||
ImGui::Begin("Simple Plot");
|
||||
|
||||
// samples.data()와 개수, optional offset 인덱스 등 넘길 수 있음
|
||||
ImGui::PlotLines("Value", m_ValueVector.data(), (int)m_ValueVector.size(), 0, nullptr, FLT_MAX, FLT_MAX, ImVec2(0, 100));
|
||||
|
||||
GUI::InputFloat("InputValue", &m_fInputValue);
|
||||
|
||||
if (GUI::Button("AddValue"))
|
||||
{
|
||||
m_ValueVector.push_back(m_fInputValue);
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
|
||||
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
|
||||
@@ -40,11 +40,13 @@ HRESULT CEffectObject::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
@@ -76,6 +78,7 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||
{
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::BLUR)))) {
|
||||
return E_FAIL;
|
||||
@@ -446,11 +449,11 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
|
||||
m_strDiffuseName = szName;
|
||||
|
||||
}
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
|
||||
reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDiffuseName),
|
||||
reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isNoise)
|
||||
@@ -471,11 +474,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strNoiseName = szName;
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
|
||||
reinterpret_cast<CComponent**>(&m_pNoise_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strNoiseName),
|
||||
reinterpret_cast<CComponent**>(&m_pNoise_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isMasking)
|
||||
@@ -497,11 +502,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strMaskingName = szName;
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
|
||||
reinterpret_cast<CComponent**>(&m_pMasking_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strMaskingName),
|
||||
reinterpret_cast<CComponent**>(&m_pMasking_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDissolve)
|
||||
@@ -521,11 +528,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strDissolveName = szName;
|
||||
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
|
||||
reinterpret_cast<CComponent**>(&m_pDissolve_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDissolveName),
|
||||
reinterpret_cast<CComponent**>(&m_pDissolve_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isEmissive)
|
||||
@@ -545,11 +554,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strEmissiveName = szName;
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
|
||||
reinterpret_cast<CComponent**>(&m_pEmissive_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strEmissiveName),
|
||||
reinterpret_cast<CComponent**>(&m_pEmissive_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
if (m_EffectInfo.isDistortion)
|
||||
@@ -569,11 +580,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strDistortionName = szName;
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName),
|
||||
reinterpret_cast<CComponent**>(&m_pDistortion_TextureCom))))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strDistortionName),
|
||||
reinterpret_cast<CComponent**>(&m_pDistortion_TextureCom))))
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
size_t iComponentLength = {};
|
||||
@@ -592,11 +605,13 @@ HRESULT CEffectObject::LoadPre(const _char* pFilePath, LEVEL eLevel)
|
||||
}
|
||||
|
||||
m_strModelName = szName;
|
||||
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
|
||||
reinterpret_cast<CComponent**>(&m_pInstance_ModelCom))))
|
||||
return E_FAIL;;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(eLevel), CMyTools::ToWstring(m_strModelName),
|
||||
reinterpret_cast<CComponent**>(&m_pInstance_ModelCom))))
|
||||
return E_FAIL;;
|
||||
|
||||
m_pInstance_ModelCom->PreLoad(hFile);
|
||||
|
||||
@@ -663,8 +678,22 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isEmissiveDissolve", &m_EffectInfo.isEmissiveDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isMaskClampSample", &m_EffectInfo.isMaskClampSample, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoiseColor", &m_EffectInfo.isNoiseColor, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNoiseAlpha", &m_EffectInfo.isNoiseAlpha, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isNomalDissolve", &m_EffectInfo.isNomalDissolve, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vColor", &m_EffectInfo.vColor, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
@@ -674,7 +703,7 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveCutAlpha", &m_EffectInfo.fEmissiveCutAlpha, sizeof(_float)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fEmissiveStrength", &m_EffectInfo.fEmissiveStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -730,12 +759,36 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDiffuseAlpha", &m_EffectInfo.fDiffuseAlpha, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftenExp", &m_EffectInfo.fSoftenExp, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftStrength", &m_EffectInfo.fSoftStrength, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoreBoost", &m_EffectInfo.fCoreBoost, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fRadius", &m_EffectInfo.fRadius, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftMaskEdge", &m_EffectInfo.fSoftMaskEdge, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fSoftMask", &m_EffectInfo.fSoftMask, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
{
|
||||
|
||||
@@ -152,8 +152,10 @@ HRESULT CEffect_Editor::ReSaveFile(const _char* pDirectoryPath)
|
||||
|
||||
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("ReSaveFile" + iIndex++ , ENUM_CLASS(LEVEL::EFFECT), &pEditEffect, &PartsDesc)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEditEffect>(ENUM_CLASS(LEVEL::EFFECT), CURRENT_LEVEL, TEXT("Layer_Effect"), &PartsDesc, this , &pEditEffect))) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(pEditEffect->LoadPre(szFilePath, LEVEL::EFFECT)))
|
||||
{
|
||||
@@ -172,7 +174,7 @@ HRESULT CEffect_Editor::ReSaveFile(const _char* pDirectoryPath)
|
||||
|
||||
pEditEffect->Save_Effect(strPath.c_str());
|
||||
|
||||
Safe_Release(pEditEffect);
|
||||
pEditEffect->Set_Dead();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
#include "pch.h"
|
||||
#include "HpBarBG.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CHpBarBG::CHpBarBG(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CHpBarBG::CHpBarBG(const CHpBarBG& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CHpBarBG::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHpBarBG::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 194.f;
|
||||
Desc.fSizeY = 32.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_vNine_Slice = _float4(27.f, 165.f, m_fSizeY * 0.5f, m_fSizeY * 0.5f);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CHpBarBG::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CHpBarBG::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CHpBarBG::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CHpBarBG::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::HPBAR)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CHpBarBG::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CHpBarBG::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CHpBarBG::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HealthMeter_Middle_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_HUD_HealthMeterFill"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CHpBarBG* CHpBarBG::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CHpBarBG* pInstance = new CHpBarBG(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CHpBarBG");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CHpBarBG::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CHpBarBG* pInstance = new CHpBarBG(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_Image");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CHpBarBG::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CHpBarBG::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -56,6 +56,8 @@
|
||||
#include "Spell_Slot.h"
|
||||
#include "Spell_Image.h"
|
||||
#include "Spell_Overlay.h"
|
||||
#include "Slot_Number.h"
|
||||
#include "HpBarBG.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
@@ -409,7 +411,6 @@ HRESULT CLoader::Loading_For_UI()
|
||||
CVIBuffer_UI_Instance::UI_INSTANCE_DESC SpellSlotUIDesc{};
|
||||
|
||||
SpellSlotUIDesc.iNum = 4;
|
||||
SpellSlotUIDesc.vPsition = _float2(100.f, 100.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"),
|
||||
CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &SpellSlotUIDesc)))) {
|
||||
@@ -419,7 +420,6 @@ HRESULT CLoader::Loading_For_UI()
|
||||
CVIBuffer_UI_Instance::UI_INSTANCE_DESC SlotNumberUIDesc{};
|
||||
|
||||
SlotNumberUIDesc.iNum = 4;
|
||||
SlotNumberUIDesc.vPsition = _float2(100.f, 100.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Slot_Number_UI_Instance"),
|
||||
CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &SlotNumberUIDesc)))) {
|
||||
@@ -522,6 +522,14 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSlot_Number>(g_iStaticLevel, CSlot_Number::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CHpBarBG>(g_iStaticLevel, CHpBarBG::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
@@ -596,9 +604,8 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0, wstrFileName)))) {
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1172,11 +1179,8 @@ void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContex
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
|
||||
{
|
||||
if (true == bUseTag)
|
||||
{
|
||||
pContents->pModelTag = wstrFileName;
|
||||
pContents->pathModel = file.path();
|
||||
}
|
||||
pContents->pModelTag = wstrFileName;
|
||||
pContents->pathModel = file.path();
|
||||
|
||||
pContents->pLoadedModel = pModel;
|
||||
|
||||
@@ -1451,7 +1455,33 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("TerrainTest"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/T_LandscapeStreamingProxy_0_LOD1_Summer_D.png"), 0)))) {
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures//T_LandscapeStreamingProxy_0_LOD1_Summer_D.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Terrain_Mask */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Mask"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Data/Map/T_OL_GrassBlend_Mask_D.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Diffuse */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Diffuse"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_D_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Normal */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Normal"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_N_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_MRO */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_MRO"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_MRO_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1476,13 +1506,13 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
vector<filesystem::path> ModelPrototypePath = {};
|
||||
|
||||
#pragma region HOGSMEADE
|
||||
|
||||
//
|
||||
///* Terrain*/
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
///* TScrolls*/
|
||||
@@ -1663,317 +1693,317 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#ifdef 기무리
|
||||
#ifdef gimch
|
||||
|
||||
vector<future<void>> jobFutures;
|
||||
|
||||
_uint iLoadCount = 46;
|
||||
vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
|
||||
{
|
||||
{ /* Terrain */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* TScrolls */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* 3BroomStick*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Ollivanders*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Gatehouse*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_QuidditchShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_HogsheadInn */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Honeydukes */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_OwlPost */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_TeaShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Zonkos */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_DB_GR */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Potions */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Salon */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Hengist_Tree */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN A*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN B*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN C*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN E*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN F*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN G*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN H*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN J*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& jobFuture : jobFutures)
|
||||
{
|
||||
jobFuture.get();
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
FOLDER_LOAD* pContents = (*Contents[i])[j];
|
||||
if (true == pContents->bLoadTags) {
|
||||
ModelPrototypeTags.push_back(pContents->pModelTag);
|
||||
ModelPrototypePath.push_back(pContents->pathModel);
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) {
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//vector<future<void>> jobFutures;
|
||||
//
|
||||
//_uint iLoadCount = 46;
|
||||
//vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
//
|
||||
//{
|
||||
// { /* Terrain */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* TScrolls */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* 3BroomStick*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Ollivanders*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Gatehouse*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_QuidditchShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_HogsheadInn */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Honeydukes */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_OwlPost */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_TeaShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Zonkos */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_DB_GR */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Potions */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Salon */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Hengist_Tree */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN A*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN B*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN C*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN E*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN F*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN G*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN H*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN J*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//for (auto& jobFuture : jobFutures)
|
||||
//{
|
||||
// jobFuture.get();
|
||||
//}
|
||||
//
|
||||
//for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
// for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
// FOLDER_LOAD* pContents = (*Contents[i])[j];
|
||||
// if (true == pContents->bLoadTags) {
|
||||
// ModelPrototypeTags.push_back(pContents->pModelTag);
|
||||
// ModelPrototypePath.push_back(pContents->pathModel);
|
||||
// }
|
||||
//
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//
|
||||
// for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) {
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
@@ -2038,12 +2068,12 @@ for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
Safe_Delete((*Contents[i])[j]);
|
||||
}
|
||||
Safe_Delete(Contents[i]);
|
||||
}
|
||||
//for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
// for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
// Safe_Delete((*Contents[i])[j]);
|
||||
// }
|
||||
// Safe_Delete(Contents[i]);
|
||||
//}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -108,9 +108,7 @@ void CLoadingWidget::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,7 @@ void CLoadingWidget_Flame::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user