mirror of
https://github.com/lubosz/overte.git
synced 2025-08-13 06:34:53 +02:00
back to the office monday morning, State almost working in the full piupeline
This commit is contained in:
parent
3baa4eadeb
commit
2a58a65a8f
4 changed files with 7 additions and 3 deletions
|
@ -262,9 +262,11 @@ void Environment::renderAtmosphere(Camera& camera, const EnvironmentData& data)
|
||||||
program->setUniformValue(locations[G2_LOCATION], -0.990f * -0.990f);
|
program->setUniformValue(locations[G2_LOCATION], -0.990f * -0.990f);
|
||||||
|
|
||||||
glDepthMask(GL_FALSE);
|
glDepthMask(GL_FALSE);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_CULL_FACE);
|
||||||
|
// glDisable(GL_DEPTH_TEST);
|
||||||
DependencyManager::get<GeometryCache>()->renderSphere(1.0f, 100, 50, glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); //Draw a unit sphere
|
DependencyManager::get<GeometryCache>()->renderSphere(1.0f, 100, 50, glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); //Draw a unit sphere
|
||||||
glDepthMask(GL_TRUE);
|
glDepthMask(GL_TRUE);
|
||||||
|
// glEnable(GL_CULL_FACE);
|
||||||
|
|
||||||
program->release();
|
program->release();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_pipeline._needStateSync) {
|
if (_pipeline._needStateSync) {
|
||||||
syncPipelineStateCache();
|
// syncPipelineStateCache();
|
||||||
_pipeline._needStateSync = false;
|
_pipeline._needStateSync = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ public:
|
||||||
public:
|
public:
|
||||||
FillMode fillMode = FILL_FACE;
|
FillMode fillMode = FILL_FACE;
|
||||||
CullMode cullMode = CULL_NONE;
|
CullMode cullMode = CULL_NONE;
|
||||||
bool frontFaceClockwise = true;
|
bool frontFaceClockwise = false;
|
||||||
bool depthClipEnable = false;
|
bool depthClipEnable = false;
|
||||||
bool scissorEnable = false;
|
bool scissorEnable = false;
|
||||||
bool multisampleEnable = false;
|
bool multisampleEnable = false;
|
||||||
|
|
|
@ -120,6 +120,8 @@ void Model::RenderPipelineLib::addRenderPipeline(Model::RenderKey& key,
|
||||||
// Backface on shadow
|
// Backface on shadow
|
||||||
if (key.isShadow()) {
|
if (key.isShadow()) {
|
||||||
state->setCullMode(gpu::State::CULL_FRONT);
|
state->setCullMode(gpu::State::CULL_FRONT);
|
||||||
|
state->setDepthBias(1.1f);
|
||||||
|
state->setDepthBiasSlopeScale(4.0f);
|
||||||
} else {
|
} else {
|
||||||
state->setCullMode(gpu::State::CULL_BACK);
|
state->setCullMode(gpu::State::CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue