Merge branch 'Effect11_17_follow' into Develope

This commit is contained in:
jinwoo0522
2025-11-17 21:28:02 +09:00
committed by GitHub
219 changed files with 505 additions and 157 deletions
@@ -3,6 +3,8 @@ vector g_vMtrlDiffuse = 1.f;
vector g_vMtrlAmbient = 1.f;
vector g_vMtrlSpecular = 1.f;
float PI = 3.14592;
sampler DefaultSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
@@ -1,4 +1,6 @@
float PI = 3.141592;
struct Particle
{
float4 vRight;
@@ -26,8 +28,9 @@ struct ParticleValue
float2 vAniTime;
float2 vAniIndex;
float fGravity;
float3 vSinAmount;
};
@@ -42,40 +45,16 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
row_major matrix CamViewInvMatrix;
bool isLoop; // 상수 버퍼에서 불값은 4바이트로 처리되기 때문에 반드시 클라에서는 int형으로 선언해라
bool isBillboard;
bool isPadding2;
bool isPadding3;
bool isDrop;
bool isMoveForward;
bool isSinWave;
float fTimeDelta;
float fPadding; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
float fPadding1; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
float fPadding2;
float fPadding3;
}
void Billboard(Particle particle)
{
if (isBillboard == true)
{
float3 vScale;
vScale.x = length(particle.vRight);
vScale.y = length(particle.vUp);
vScale.z = length(particle.vLook);
particle.vRight = CamViewInvMatrix[0] * vScale.x;
particle.vUp = CamViewInvMatrix[1] * vScale.y;
particle.vLook = CamViewInvMatrix[2] * vScale.z;
//180도 회전 시키기
particle.vRight.x *= -1.f;
particle.vLook.z *= -1.f;
}
}
//내가 몇개의 스레드를 사용할 것인지 지정하는데
//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다.
[numthreads(256, 1, 1)]
@@ -88,26 +67,47 @@ void CS_MAIN(
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
// 라이프타임 움직임
particle.vTranslation.y -= particleValue.fSpeed * fTimeDelta;
// 라이프타임 움직임
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;
}
if (isMoveForward)
{
float4 vVelocity = vector(normalize(particleValue.vOriginLook.xyz) * particleValue.fSpeed, 1.f);
Billboard(particle);
particle.vTranslation += vVelocity * fTimeDelta;
}
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);
}
//애니메이션 속도 , 인덱스
particleValue.vAniTime.x += fTimeDelta;
@@ -152,6 +152,13 @@ void CS_MAIN(
{
particleValue.vNoiseUVMoveTime.x = 0.f;
}
particleValue.vDistortionUVMoveTime.x += fTimeDelta;
if (particleValue.vDistortionUVMoveTime.x >= particleValue.vDistortionUVMoveTime.y)
{
particleValue.vDistortionUVMoveTime.x = 0.f;
}
//아웃풋 대입
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,8 @@ vector g_vMtrlDiffuse = 1.f;
vector g_vMtrlAmbient = 1.f;
vector g_vMtrlSpecular = 1.f;
float PI = 3.14592;
sampler DefaultSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
@@ -1,4 +1,6 @@
float PI = 3.141592;
struct Particle
{
float4 vRight;
@@ -26,8 +28,9 @@ struct ParticleValue
float2 vAniTime;
float2 vAniIndex;
float fGravity;
float3 vSinAmount;
};
@@ -42,40 +45,16 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
row_major matrix CamViewInvMatrix;
bool isLoop; // 상수 버퍼에서 불값은 4바이트로 처리되기 때문에 반드시 클라에서는 int형으로 선언해라
bool isBillboard;
bool isPadding2;
bool isPadding3;
bool isDrop;
bool isMoveForward;
bool isSinWave;
float fTimeDelta;
float fPadding; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
float fPadding1; // 반드시 상수버퍼는 16바이트 배수로 만들어져야 한다.
float fPadding2;
float fPadding3;
}
void Billboard(Particle particle)
{
if (isBillboard == true)
{
float3 vScale;
vScale.x = length(particle.vRight);
vScale.y = length(particle.vUp);
vScale.z = length(particle.vLook);
particle.vRight = CamViewInvMatrix[0] * vScale.x;
particle.vUp = CamViewInvMatrix[1] * vScale.y;
particle.vLook = CamViewInvMatrix[2] * vScale.z;
//180도 회전 시키기
particle.vRight.x *= -1.f;
particle.vLook.z *= -1.f;
}
}
//내가 몇개의 스레드를 사용할 것인지 지정하는데
//GPU 칩의 개수를 X * Y * Z의 개수 만큼 사용하겠다는 의미이다.
[numthreads(256, 1, 1)]
@@ -88,26 +67,47 @@ void CS_MAIN(
ParticleValue particleValue = g_ParticleValueBufferInput[iIndex];
// 라이프타임 움직임
particle.vTranslation.y -= particleValue.fSpeed * fTimeDelta;
// 라이프타임 움직임
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;
}
if (isMoveForward)
{
float4 vVelocity = vector(normalize(particleValue.vOriginLook.xyz) * particleValue.fSpeed, 1.f);
Billboard(particle);
particle.vTranslation += vVelocity * fTimeDelta;
}
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);
}
//애니메이션 속도 , 인덱스
particleValue.vAniTime.x += fTimeDelta;
@@ -152,6 +152,13 @@ void CS_MAIN(
{
particleValue.vNoiseUVMoveTime.x = 0.f;
}
particleValue.vDistortionUVMoveTime.x += fTimeDelta;
if (particleValue.vDistortionUVMoveTime.x >= particleValue.vDistortionUVMoveTime.y)
{
particleValue.vDistortionUVMoveTime.x = 0.f;
}
//아웃풋 대입
@@ -1,7 +1,5 @@
#include "Engine_Shader_Defines.hlsli"
float PI = 3.141592;
struct ParticleValue
{
float fSpeed;
@@ -312,12 +310,14 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
UV = UV + (vMtrlDistortion).rg * g_fNoiseDistortionIntensity;
}
/* 최종 색깔 */
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
if (g_vColor.a > 0)
vMtrlDiffuse += g_vColor;
@@ -354,14 +354,14 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
{
float2 UV; // 이미지의 UV값
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vDistortionUVMoveTime.x / vDistortionUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r / g_vUVCutting * g_fNoiseDistortionIntensity;
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
vMtrlDiffuse *= vMtrlDistortion.r;
}
@@ -529,8 +529,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
//0.5f를 빼는 이유는 중심을 0으로 옮겨서 양음수 방향으로 offset을 줄수 있다.
vMtrlDistortion.rg -= 0.5f;
//아마 분할되었다면 noise도 분할해야할듯
vMtrlDistortion.rg /= g_vUVCutting;
////아마 분할되었다면 noise도 분할해야할듯
//vMtrlDistortion.rg /= g_vUVCutting;
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
@@ -573,14 +573,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
{
float2 UV; // 이미지의 UV값
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
float2 vDistortionUV = In.vTexcoord + SelectLerpUV(g_vMaskDistortionUVGainAmount, (vDistortionUVMoveTime.x / vDistortionUVMoveTime.y), g_iMaskDistortionMoveLerpOption);
vMtrlDistortion = g_DistortionTexture.Sample(DefaultSampler, vDistortionUV);
//디스토션(노이즈) 텍스쳐로 uv를 왜곡함
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r / g_vUVCutting * g_fNoiseDistortionIntensity;
vMtrlDiffuse *= vMtrlDistortion.r;
vMaskTexcoord = vMaskTexcoord + (vMtrlDistortion - 0.5f).r * g_fNoiseDistortionIntensity;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 KiB

Some files were not shown because too many files have changed in this diff Show More