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="<=3.1.8787" disable="ForceLegacyDevice"/>
|
||||
<card os="android" disable="TextureFormatBGRA8888"/>
|
||||
<card os="android" disable="ColorBufferFloat"/>
|
||||
</graphical-restrictions>
|
||||
|
@ -431,10 +431,8 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, unsigned po
|
||||
{
|
||||
PROFILER_PUSH_CPU_MARKER("- SSAO", 0xFF, 0xFF, 0x00);
|
||||
ScopedGPUTimer Timer(getGPUTimer(Q_SSAO));
|
||||
#if !defined(USE_GLES2)
|
||||
if (UserConfigParams::m_ssao)
|
||||
renderSSAO();
|
||||
#endif
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
}
|
||||
|
||||
|
@ -527,6 +527,11 @@ void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
|
||||
// ----------------------------------------------------------------------------
|
||||
void IrrDriver::renderSSAO()
|
||||
{
|
||||
#if defined(USE_GLES2)
|
||||
if (!CVS->isEXTColorBufferFloatUsable())
|
||||
return;
|
||||
#endif
|
||||
|
||||
m_rtts->getFBO(FBO_SSAO).bind();
|
||||
glClearColor(1., 1., 1., 1.);
|
||||
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
|
||||
// as the screen, for use in post-processing.
|
||||
|
||||
#if !defined(USE_GLES2)
|
||||
GLint rgba_internal_format = GL_RGBA16F;
|
||||
GLint rgba_format = GL_BGRA;
|
||||
GLint red_internal_format = GL_R16F;
|
||||
@ -88,15 +87,19 @@ RTT::RTT(size_t width, size_t height)
|
||||
GLint rgb_format = GL_BGR;
|
||||
GLint diffuse_specular_internal_format = GL_R11F_G11F_B10F;
|
||||
GLint type = GL_FLOAT;
|
||||
#else
|
||||
GLint rgba_internal_format = GL_RGBA8;
|
||||
GLint rgba_format = GL_RGBA;
|
||||
GLint red_internal_format = GL_R8;
|
||||
GLint red32_internal_format = GL_R8;
|
||||
GLint red_format = GL_RED;
|
||||
GLint rgb_format = GL_RGB;
|
||||
GLint diffuse_specular_internal_format = GL_RGBA8;
|
||||
GLint type = GL_UNSIGNED_BYTE;
|
||||
|
||||
#if defined(USE_GLES2)
|
||||
if (!CVS->isEXTColorBufferFloatUsable())
|
||||
{
|
||||
rgba_internal_format = GL_RGBA8;
|
||||
rgba_format = GL_RGBA;
|
||||
red_internal_format = GL_R8;
|
||||
red32_internal_format = GL_R8;
|
||||
red_format = GL_RED;
|
||||
rgb_format = GL_RGB;
|
||||
diffuse_specular_internal_format = GL_RGBA8;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
}
|
||||
#endif
|
||||
|
||||
RenderTargetTextures[RTT_TMP1] = generateRTT(res, rgba_internal_format, rgba_format, type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user