Render roads directly as part of the tile texture in shaders/simple.frag
This commit is contained in:
+1
-15
@@ -3079,25 +3079,11 @@ void QSceneRenderer::paintGL()
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Render 3D Roads (above terrain elevation, writes depth so units and cities render on top)
|
||||
// 2. Render 3D Units & Cities (Cylinders & Bastions; roads are rendered directly in the tile shader texture)
|
||||
float fSunAngle = 45.0f;
|
||||
QVector3D vSunPos(-sin(fSunAngle * PI / 180.0f), -cos(fSunAngle * PI / 180.0f), 0.6f);
|
||||
vSunPos.normalize();
|
||||
|
||||
m_unitRenderer.renderRoads(
|
||||
GameManager::instance().getTileRoads(),
|
||||
GameManager::instance().roadConfigs(),
|
||||
m_point,
|
||||
m_numPoints05,
|
||||
Projection,
|
||||
vMatrix,
|
||||
vSunPos,
|
||||
cityViewRadius,
|
||||
cityView ? cityView->tileX : -1,
|
||||
cityView ? cityView->tileY : -1
|
||||
);
|
||||
|
||||
// 3. Render 3D Units & Cities (Cylinders & Bastions)
|
||||
Unit *selected = GameManager::instance().getSelectedUnit();
|
||||
m_unitRenderer.renderUnits(
|
||||
GameManager::instance().getUnits(),
|
||||
|
||||
Reference in New Issue
Block a user