Skip to content

Commit 1f1d7cb

Browse files
committed
Code review
1 parent 1165260 commit 1f1d7cb

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

‎Src/NPREffect.cpp‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ void NPREffect::SetDiffuseColor(FXMVECTOR value)
665665

666666
void NPREffect::SetSpecularColor(FXMVECTOR value)
667667
{
668+
// TODO: specular power needs to be specular threshold!
668669
// Set xyz, preserve w (specular power).
669670
pImpl->constants.specularColorAndSpecularPower = XMVectorSelect(pImpl->constants.specularColorAndSpecularPower, value, g_XMSelect1110);
670671

@@ -709,8 +710,12 @@ void NPREffect::SetColorAndAlpha(FXMVECTOR value)
709710
}
710711

711712

712-
// Texture settings.
713-
// TODO: Implement texture settings.
713+
// Texture setting.
714+
void NPREffect::SetTexture(D3D12_GPU_DESCRIPTOR_HANDLE srvDescriptor, D3D12_GPU_DESCRIPTOR_HANDLE samplerDescriptor)
715+
{
716+
pImpl->texture = srvDescriptor;
717+
pImpl->sampler = samplerDescriptor;
718+
}
714719

715720

716721
// Cel shading settings.
@@ -738,11 +743,3 @@ void NPREffect::SetGoochWarmColor(FXMVECTOR value, float beta)
738743

739744
pImpl->dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
740745
}
741-
742-
743-
// Texture setting.
744-
void NPREffect::SetTexture(D3D12_GPU_DESCRIPTOR_HANDLE srvDescriptor, D3D12_GPU_DESCRIPTOR_HANDLE samplerDescriptor)
745-
{
746-
pImpl->texture = srvDescriptor;
747-
pImpl->sampler = samplerDescriptor;
748-
}

0 commit comments

Comments
 (0)