mirror of https://github.com/doitsujin/dxvk
[d3d9] FF: Prevent specular highlights on the back of geometry
Fixes the Wine test "test_specular_lighting".
This commit is contained in:
parent
f984dd4df2
commit
0e466b0413
|
@ -1315,6 +1315,8 @@ namespace dxvk {
|
|||
uint32_t midDot = m_module.opDot(m_floatType, normal, mid);
|
||||
midDot = m_module.opFClamp(m_floatType, midDot, m_module.constf32(0.0f), m_module.constf32(1.0f));
|
||||
uint32_t doSpec = m_module.opFOrdGreaterThan(bool_t, midDot, m_module.constf32(0.0f));
|
||||
doSpec = m_module.opLogicalAnd(bool_t, doSpec, m_module.opFOrdGreaterThan(m_floatType, hitDot, m_module.constf32(0.0f)));
|
||||
|
||||
uint32_t specularness = m_module.opPow(m_floatType, midDot, m_vs.constants.materialPower);
|
||||
specularness = m_module.opFMul(m_floatType, specularness, atten);
|
||||
specularness = m_module.opSelect(m_floatType, doSpec, specularness, m_module.constf32(0.0f));
|
||||
|
|
Loading…
Reference in New Issue