[fix] Sampler

This commit is contained in:
kimnuri
2026-02-07 20:13:09 +09:00
parent 1954c0274f
commit a54e0584aa
5 changed files with 10 additions and 28 deletions
@@ -221,7 +221,7 @@ HRESULT CLevel_Field::Ready_Camera()
Camera_Desc.pCameraKey = CAMERA_DEBUG;
Camera_Desc.fRotationPerSec = XMConvertToRadians(90.0f);
Camera_Desc.fMouseSensor = 0.1f;
Camera_Desc.iPriority = 53;
Camera_Desc.iPriority = 52;
Camera_Desc.pFollowTarget = { nullptr };
Camera_Desc.pLookTarget = { nullptr };
@@ -245,7 +245,7 @@ HRESULT CLevel_Field::Ready_Camera()
Camera_Desc.fNear = 0.1f;
Camera_Desc.fFar = 500.f;
Camera_Desc.pCameraKey = CAMERA_CINEMATIC;
Camera_Desc.iPriority = 52;
Camera_Desc.iPriority = 53;
Camera_Desc.bEnableTransitionLerp = false;
Camera_Desc.bEnableLookLerp = false;
Camera_Desc.bEnableFollowLerp = false;
@@ -48,15 +48,6 @@ sampler BorderZeroSampler = sampler_state
AddressV = Border;
BorderColor = float4(0.f, 0.f, 0.f, 0.f);
};
sampler BorderHalfSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = Border;
AddressV = Border;
BorderColor = float4(0.5f, 0.5f, 0.5f, 0.5f);
};
sampler BorderZeroLinearSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
@@ -398,7 +398,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TILESAMPLE(PS_IN In)
float2 vSourceUV = (float2(vSourcePixel) + 0.5f) * vSrcTexelSize;
vSampleVel = g_VelocityTexture.SampleLevel(BorderHalfSampler, vSourceUV, 0).xy;
vSampleVel = g_VelocityTexture.SampleLevel(ClampSampler, vSourceUV, 0).xy;
vSampleUV = vSampleVel * 2.0f - 1.0f;
@@ -434,7 +434,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
{
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
vSampleVel = g_VelocityTexture.Sample(BorderHalfSampler, vSampleUV).xy;
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV).xy;
vSampleDiff = vSampleVel *2.f - 1.f;
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
if (fSampleSpeed > vMaxSpeed) {
@@ -726,8 +726,8 @@ PS_OUT_DEBUG_MOTIONBLUR PS_MAIN_DEBUG_MOTIONBLUR_INTENSE(PS_IN In)
{
PS_OUT_DEBUG_MOTIONBLUR Out;
float2 vBase = g_VelocityTexture.Sample(BorderHalfSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vTent = g_TileVelocityTexture.Sample(BorderHalfSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vBase = g_VelocityTexture.Sample(ClampSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vTent = g_TileVelocityTexture.Sample(ClampSampler, In.vTexcoord).xy * 2.f - 1.f;
vBase *= 25.5f;
vTent *= 25.5f;
@@ -48,15 +48,6 @@ sampler BorderZeroSampler = sampler_state
AddressV = Border;
BorderColor = float4(0.f, 0.f, 0.f, 0.f);
};
sampler BorderHalfSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = Border;
AddressV = Border;
BorderColor = float4(0.5f, 0.5f, 0.5f, 0.5f);
};
sampler BorderZeroLinearSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
@@ -398,7 +398,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TILESAMPLE(PS_IN In)
float2 vSourceUV = (float2(vSourcePixel) + 0.5f) * vSrcTexelSize;
vSampleVel = g_VelocityTexture.SampleLevel(BorderHalfSampler, vSourceUV, 0).xy;
vSampleVel = g_VelocityTexture.SampleLevel(ClampSampler, vSourceUV, 0).xy;
vSampleUV = vSampleVel * 2.0f - 1.0f;
@@ -434,7 +434,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
{
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
vSampleVel = g_VelocityTexture.Sample(BorderHalfSampler, vSampleUV).xy;
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV).xy;
vSampleDiff = vSampleVel *2.f - 1.f;
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
if (fSampleSpeed > vMaxSpeed) {
@@ -726,8 +726,8 @@ PS_OUT_DEBUG_MOTIONBLUR PS_MAIN_DEBUG_MOTIONBLUR_INTENSE(PS_IN In)
{
PS_OUT_DEBUG_MOTIONBLUR Out;
float2 vBase = g_VelocityTexture.Sample(BorderHalfSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vTent = g_TileVelocityTexture.Sample(BorderHalfSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vBase = g_VelocityTexture.Sample(ClampSampler, In.vTexcoord).xy * 2.f - 1.f;
float2 vTent = g_TileVelocityTexture.Sample(ClampSampler, In.vTexcoord).xy * 2.f - 1.f;
vBase *= 25.5f;
vTent *= 25.5f;