Restore SSAO on linux with GLES renderer.
This commit is contained in:
parent
21d62ed405
commit
852cc068d3
@ -30,4 +30,5 @@
|
|||||||
<card contains="ATI" os="windows" version="<14.300" disable="DriverRecentEnough"/>
|
<card contains="ATI" os="windows" version="<14.300" disable="DriverRecentEnough"/>
|
||||||
<card contains="ATI" os="windows" version="<=3.1.8787" disable="ForceLegacyDevice"/>
|
<card contains="ATI" os="windows" version="<=3.1.8787" disable="ForceLegacyDevice"/>
|
||||||
<card os="android" disable="TextureFormatBGRA8888"/>
|
<card os="android" disable="TextureFormatBGRA8888"/>
|
||||||
|
<card os="android" disable="ColorBufferFloat"/>
|
||||||
</graphical-restrictions>
|
</graphical-restrictions>
|
||||||
|
@ -431,10 +431,8 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, unsigned po
|
|||||||
{
|
{
|
||||||
PROFILER_PUSH_CPU_MARKER("- SSAO", 0xFF, 0xFF, 0x00);
|
PROFILER_PUSH_CPU_MARKER("- SSAO", 0xFF, 0xFF, 0x00);
|
||||||
ScopedGPUTimer Timer(getGPUTimer(Q_SSAO));
|
ScopedGPUTimer Timer(getGPUTimer(Q_SSAO));
|
||||||
#if !defined(USE_GLES2)
|
|
||||||
if (UserConfigParams::m_ssao)
|
if (UserConfigParams::m_ssao)
|
||||||
renderSSAO();
|
renderSSAO();
|
||||||
#endif
|
|
||||||
PROFILER_POP_CPU_MARKER();
|
PROFILER_POP_CPU_MARKER();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,6 +527,11 @@ void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void IrrDriver::renderSSAO()
|
void IrrDriver::renderSSAO()
|
||||||
{
|
{
|
||||||
|
#if defined(USE_GLES2)
|
||||||
|
if (!CVS->isEXTColorBufferFloatUsable())
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
m_rtts->getFBO(FBO_SSAO).bind();
|
m_rtts->getFBO(FBO_SSAO).bind();
|
||||||
glClearColor(1., 1., 1., 1.);
|
glClearColor(1., 1., 1., 1.);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
@ -79,7 +79,6 @@ RTT::RTT(size_t width, size_t height)
|
|||||||
// All RTTs are currently RGBA16F mostly with stencil. The four tmp RTTs are the same size
|
// All RTTs are currently RGBA16F mostly with stencil. The four tmp RTTs are the same size
|
||||||
// as the screen, for use in post-processing.
|
// as the screen, for use in post-processing.
|
||||||
|
|
||||||
#if !defined(USE_GLES2)
|
|
||||||
GLint rgba_internal_format = GL_RGBA16F;
|
GLint rgba_internal_format = GL_RGBA16F;
|
||||||
GLint rgba_format = GL_BGRA;
|
GLint rgba_format = GL_BGRA;
|
||||||
GLint red_internal_format = GL_R16F;
|
GLint red_internal_format = GL_R16F;
|
||||||
@ -88,15 +87,19 @@ RTT::RTT(size_t width, size_t height)
|
|||||||
GLint rgb_format = GL_BGR;
|
GLint rgb_format = GL_BGR;
|
||||||
GLint diffuse_specular_internal_format = GL_R11F_G11F_B10F;
|
GLint diffuse_specular_internal_format = GL_R11F_G11F_B10F;
|
||||||
GLint type = GL_FLOAT;
|
GLint type = GL_FLOAT;
|
||||||
#else
|
|
||||||
GLint rgba_internal_format = GL_RGBA8;
|
#if defined(USE_GLES2)
|
||||||
GLint rgba_format = GL_RGBA;
|
if (!CVS->isEXTColorBufferFloatUsable())
|
||||||
GLint red_internal_format = GL_R8;
|
{
|
||||||
GLint red32_internal_format = GL_R8;
|
rgba_internal_format = GL_RGBA8;
|
||||||
GLint red_format = GL_RED;
|
rgba_format = GL_RGBA;
|
||||||
GLint rgb_format = GL_RGB;
|
red_internal_format = GL_R8;
|
||||||
GLint diffuse_specular_internal_format = GL_RGBA8;
|
red32_internal_format = GL_R8;
|
||||||
GLint type = GL_UNSIGNED_BYTE;
|
red_format = GL_RED;
|
||||||
|
rgb_format = GL_RGB;
|
||||||
|
diffuse_specular_internal_format = GL_RGBA8;
|
||||||
|
type = GL_UNSIGNED_BYTE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RenderTargetTextures[RTT_TMP1] = generateRTT(res, rgba_internal_format, rgba_format, type);
|
RenderTargetTextures[RTT_TMP1] = generateRTT(res, rgba_internal_format, rgba_format, type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user