[merge commit]
This commit is contained in:
@@ -87,7 +87,6 @@ HRESULT CMainApp::Render()
|
||||
|
||||
m_pGameInstance->Draw();
|
||||
GUI::Render();
|
||||
//m_pGameInstance->Render_Font(TEXT("HYHL"), TEXT("피곤해 못 써"), _float2(0.f, 0.f), XMVectorSet(1.f, 0.f, 0.f, 1.f));
|
||||
ImGui_ImplDX11_RenderDrawData(GUI::GetDrawData());
|
||||
m_pGameInstance->Render_End();
|
||||
|
||||
|
||||
@@ -72,15 +72,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], LocalMatrix);
|
||||
}
|
||||
}
|
||||
//{
|
||||
// D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
// if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
|
||||
// m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
|
||||
//}
|
||||
//m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -115,35 +106,6 @@ HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DY
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Create_BoneCombinedMatrixSRV()
|
||||
{
|
||||
D3D11_BUFFER_DESC desc{};
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
desc.ByteWidth = sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
desc.StructureByteStride = sizeof(_float4x4);
|
||||
desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
|
||||
|
||||
if (FAILED(m_pDevice->CreateBuffer(&desc, nullptr, &m_pBoneCombinedMatrixBuffer))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
|
||||
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
|
||||
srvDesc.Format = DXGI_FORMAT_UNKNOWN;
|
||||
srvDesc.Buffer.FirstElement = 0;
|
||||
srvDesc.Buffer.NumElements = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateShaderResourceView(m_pBoneCombinedMatrixBuffer, &srvDesc, &m_pBoneCombinedMatrixSRV))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayerRobe::Update_LegsPosition()
|
||||
{
|
||||
_matrix WorldMatrix = m_pParentTransformCom->Get_XMWorldMatrix();
|
||||
@@ -526,13 +488,6 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
|
||||
m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
|
||||
m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg");
|
||||
|
||||
{
|
||||
ZeroMemory(&m_BoneInsertionDesc, sizeof(m_BoneInsertionDesc));
|
||||
m_BoneInsertionDesc.iMatrixCount = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END);
|
||||
m_BoneInsertionDesc.iStartOffset = m_pModelCom->Get_BoneIndex(PLAYER_JOINT_BONE_NAMES[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP)]);
|
||||
}
|
||||
Create_BoneCombinedMatrixSRV();
|
||||
|
||||
XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr()));
|
||||
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
@@ -647,8 +602,6 @@ void CPlayerRobe::Free()
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pDepthStencilStateNone);
|
||||
#endif // _DEBUG
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixSRV);
|
||||
SAFE_RELEASE(m_pBoneCombinedMatrixBuffer);
|
||||
SAFE_RELEASE(m_pRightLeg);
|
||||
SAFE_RELEASE(m_pLeftLeg);
|
||||
SAFE_RELEASE(m_pRobeMainAnchor);
|
||||
@@ -666,12 +619,13 @@ void CPlayerRobe::Describe_Entity()
|
||||
GUI::Begin("PhysX");
|
||||
if (GUI::CollapsingHeader("Robe")) {
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
if (GUI::BeginChild("##i")) {
|
||||
if (GUI::BeginChild(("Child ID: " + to_string((size_t)(this))).c_str())) {
|
||||
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -56,10 +56,6 @@ class CPlayerRobe final : public CPartObject
|
||||
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
|
||||
|
||||
ID3D11Buffer* m_pBoneCombinedMatrixBuffer = { nullptr };
|
||||
ID3D11ShaderResourceView* m_pBoneCombinedMatrixSRV = { nullptr };
|
||||
|
||||
CModel::BONEINSERTION_DESC m_BoneInsertionDesc = {};
|
||||
vector<_float4x4> m_PrevRobeBoneMatrices = { };
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
@@ -76,7 +72,6 @@ class CPlayerRobe final : public CPartObject
|
||||
|
||||
HRESULT Update_LegsPosition();
|
||||
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
HRESULT Create_BoneCombinedMatrixSRV();
|
||||
#ifdef _DEBUG
|
||||
HRESULT Render_BonePhysX();
|
||||
HRESULT Render_Legs();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef ENGINE_SHADER_DEFINES_HLSLI
|
||||
#define ENGINE_SHADER_DEFINES_HLSLI
|
||||
|
||||
#pragma pack_matrix(row_major)
|
||||
#include "Engine_Shader_Constants.hlsli"
|
||||
#include "Engine_Shader_Structures.hlsli"
|
||||
#include "Engine_Shader_Samplers.hlsli"
|
||||
|
||||
@@ -37,35 +37,35 @@ float g_TempWeight;
|
||||
|
||||
|
||||
|
||||
Texture2D g_DiffuseTexture : register(t00);
|
||||
Texture2D g_SpecularTexture : register(t01);
|
||||
Texture2D g_AmbientTexture : register(t02);
|
||||
Texture2D g_EmissiveTexture : register(t03);
|
||||
Texture2D g_HeightTexture : register(t04);
|
||||
Texture2D g_NormalTexture : register(t05);
|
||||
Texture2D g_ShininessTexture : register(t06);
|
||||
Texture2D g_NormalBlendTexture : register(t07); // OPACITY
|
||||
Texture2D g_SROBlendTexture : register(t08);
|
||||
Texture2D g_LightMapTexture : register(t09);
|
||||
Texture2D g_ReflectionTexture : register(t10);
|
||||
Texture2D g_DiffuseBlend : register(t11); // BASE_COLOR
|
||||
Texture2D g_NormalCameraTexture : register(t12);
|
||||
Texture2D g_EmissionColorTexture : register(t13);
|
||||
Texture2D g_MetalnessTexture : register(t14);
|
||||
Texture2D g_Diffuse_RoughnessTexture : register(t15);
|
||||
Texture2D g_AmbientOcclusionTexture : register(t16);
|
||||
Texture2D g_UnknownTexture : register(t17);
|
||||
Texture2D g_SheenTexture : register(t18);
|
||||
Texture2D g_ClearcoatTexture : register(t19);
|
||||
Texture2D g_TransmissionTexture : register(t20);
|
||||
Texture2D g_Maya_BaseTexture : register(t21);
|
||||
Texture2D g_Maya_SpecularTexture : register(t22);
|
||||
Texture2D g_Maya_Specular_ColorTexture : register(t23);
|
||||
Texture2D g_Maya_Specular_RoughnessTexture : register(t24);
|
||||
Texture2D g_AnisotropyTexture : register(t25);
|
||||
Texture2D g_DiffuseTexture : register(t00);
|
||||
Texture2D g_SpecularTexture : register(t01);
|
||||
Texture2D g_AmbientTexture : register(t02);
|
||||
Texture2D g_EmissiveTexture : register(t03);
|
||||
Texture2D g_HeightTexture : register(t04);
|
||||
Texture2D g_NormalTexture : register(t05);
|
||||
Texture2D g_ShininessTexture : register(t06);
|
||||
Texture2D g_NormalBlendTexture : register(t07); // OPACITY
|
||||
Texture2D g_SROBlendTexture : register(t08);
|
||||
Texture2D g_LightMapTexture : register(t09);
|
||||
Texture2D g_ReflectionTexture : register(t10);
|
||||
Texture2D g_DiffuseBlend : register(t11); // BASE_COLOR
|
||||
Texture2D g_NormalCameraTexture : register(t12);
|
||||
Texture2D g_EmissionColorTexture : register(t13);
|
||||
Texture2D g_MetalnessTexture : register(t14);
|
||||
Texture2D g_Diffuse_RoughnessTexture : register(t15);
|
||||
Texture2D g_AmbientOcclusionTexture : register(t16);
|
||||
Texture2D g_UnknownTexture : register(t17);
|
||||
Texture2D g_SheenTexture : register(t18);
|
||||
Texture2D g_ClearcoatTexture : register(t19);
|
||||
Texture2D g_TransmissionTexture : register(t20);
|
||||
Texture2D g_Maya_BaseTexture : register(t21);
|
||||
Texture2D g_Maya_SpecularTexture : register(t22);
|
||||
Texture2D g_Maya_Specular_ColorTexture : register(t23);
|
||||
Texture2D g_Maya_Specular_RoughnessTexture : register(t24);
|
||||
Texture2D g_AnisotropyTexture : register(t25);
|
||||
|
||||
StructuredBuffer<BoneOut> g_BoneBuffer : register(t26);
|
||||
StructuredBuffer<BoneOut> g_PrevBoneBuffer : register(t27);
|
||||
StructuredBuffer<BoneOut> g_BoneBuffer : register(t26);
|
||||
StructuredBuffer<BoneOut> g_PrevBoneBuffer : register(t27);
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ struct VS_OUT
|
||||
};
|
||||
VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
@@ -135,7 +135,7 @@ VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
@@ -250,7 +250,87 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
||||
|
||||
BoneMatrix = TempBoneMatrix;
|
||||
|
||||
|
||||
//matrix BoneMatrix = (matrix) 0;
|
||||
//{
|
||||
// uint iIndex = idx.x;
|
||||
// float fWeight = w.x;
|
||||
// if (isRobe)
|
||||
// {
|
||||
// if (29 == iIndex)
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneMatrices[iIndex]));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
// }
|
||||
//}
|
||||
//{
|
||||
// uint iIndex = idx.y;
|
||||
// float fWeight = w.y;
|
||||
// if (isRobe)
|
||||
// {
|
||||
// if (29 == iIndex)
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneMatrices[iIndex]));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
// }
|
||||
//}
|
||||
//{
|
||||
// uint iIndex = idx.z;
|
||||
// float fWeight = w.z;
|
||||
// if (isRobe)
|
||||
// {
|
||||
// if (29 == iIndex)
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneMatrices[iIndex]));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
// }
|
||||
//}
|
||||
//{
|
||||
// uint iIndex = idx.w;
|
||||
// float fWeight = w.w;
|
||||
// if (isRobe)
|
||||
// {
|
||||
// if (29 == iIndex)
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneMatrices[iIndex]));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BoneMatrix += mul(fWeight, mul(g_OffsetMatrix[iIndex], g_BoneBuffer[iIndex].LocalCombined));
|
||||
// }
|
||||
//}
|
||||
|
||||
//float robeWeight =
|
||||
// g_RobeBoneMask[idx.x] * w.x
|
||||
@@ -316,7 +396,7 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
||||
|
||||
VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
@@ -476,7 +556,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -519,7 +599,7 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -552,7 +632,7 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -582,7 +662,7 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYE_OCC(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
discard;
|
||||
return Out;
|
||||
}
|
||||
@@ -590,7 +670,7 @@ PS_OUT PS_EYE_OCC(PS_IN In)
|
||||
PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -634,7 +714,7 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -677,7 +757,7 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -709,7 +789,7 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -741,7 +821,7 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -773,7 +853,7 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -805,7 +885,7 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -839,7 +919,7 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -873,7 +953,7 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -907,7 +987,7 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -946,7 +1026,7 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -986,7 +1066,7 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 p = uv - center;
|
||||
@@ -1031,7 +1111,7 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1061,7 +1141,7 @@ PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1093,7 +1173,7 @@ PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1123,7 +1203,7 @@ PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1133,17 +1213,17 @@ PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
|
||||
}
|
||||
float3 vHairBaseColor = g_NormalBlendTexture.Sample(DefaultSampler, uv).rrr;
|
||||
float4 vNormalColor = g_NormalTexture.Sample(DefaultSampler, uv);
|
||||
float4 vTHVColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
|
||||
float4 vTHVColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
float AlphaMask = vDAOColor.g;
|
||||
float AoMask_Dao = vDAOColor.b;
|
||||
float RootTip = vTHVColor.r;
|
||||
float SpecMask = vTHVColor.g;
|
||||
float AoMask_Thv = vTHVColor.b; // Volume
|
||||
float AlphaMask = vDAOColor.g;
|
||||
float AoMask_Dao = vDAOColor.b;
|
||||
float RootTip = vTHVColor.r;
|
||||
float SpecMask = vTHVColor.g;
|
||||
float AoMask_Thv = vTHVColor.b; // Volume
|
||||
|
||||
float3 vColorHair = clamp(ColorMixer(vHairBaseColor, UnpackRGB8(g_iPackedBlendColor), g_fMixerFactor, g_iColorMixerMethod), 0.f, 1.f);
|
||||
float3 vColorRoot = vColorHair * 0.6f;
|
||||
@@ -1199,19 +1279,20 @@ PS_OUT_BLEND PS_Dragon_EtherealWings(PS_IN In)
|
||||
{
|
||||
PS_OUT_BLEND Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 uvDiffuse = uv; uvDiffuse.y -= g_fEtherealRatio;
|
||||
float2 uvDiffuse = uv;
|
||||
uvDiffuse.y -= g_fEtherealRatio;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uvDiffuse);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, uv);
|
||||
vDiffuse += vEmissive;
|
||||
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uvDiffuse).a;
|
||||
vDiffuse.a = (1- fOppacity);
|
||||
vDiffuse.a = (1 - fOppacity);
|
||||
Out.vAlbedo = vDiffuse;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1247,7 +1328,7 @@ PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
|
||||
PS_OUT PS_Dragon_Wings(PS_IN In)
|
||||
{
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
PS_OUT Out = (PS_OUT) 0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef ENGINE_SHADER_DEFINES_HLSLI
|
||||
#define ENGINE_SHADER_DEFINES_HLSLI
|
||||
|
||||
#pragma pack_matrix(row_major)
|
||||
#include "Engine_Shader_Constants.hlsli"
|
||||
#include "Engine_Shader_Structures.hlsli"
|
||||
#include "Engine_Shader_Samplers.hlsli"
|
||||
|
||||
Reference in New Issue
Block a user