mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxso] Initialize vPos in shaders if we have pixel fog
Fixes some fog related regressions since we deferred this
This commit is contained in:
parent
ce51431860
commit
08fc5342a9
@ -3561,6 +3561,15 @@ void DxsoCompiler::emitControlFlowGenericLoop(
|
|||||||
|
|
||||||
this->emitInputSetup();
|
this->emitInputSetup();
|
||||||
|
|
||||||
|
bool canUsePixelFog = m_programInfo.majorVersion() < 3;
|
||||||
|
|
||||||
|
if (canUsePixelFog) {
|
||||||
|
// Look up vPos so it gets initted.
|
||||||
|
DxsoRegister vPos;
|
||||||
|
vPos.id = DxsoRegisterId{ DxsoRegisterType::MiscType, DxsoMiscTypeIndices::MiscTypePosition };
|
||||||
|
auto vPosPtr = this->emitGetOperandPtr(vPos);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_ps.vPos.id != 0) {
|
if (m_ps.vPos.id != 0) {
|
||||||
DxsoRegisterPointer fragCoord = this->emitRegisterPtr(
|
DxsoRegisterPointer fragCoord = this->emitRegisterPtr(
|
||||||
"ps_frag_coord", DxsoScalarType::Float32, 4, 0,
|
"ps_frag_coord", DxsoScalarType::Float32, 4, 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user