Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Bad quality bloom

Threaded View

  1. #1
    Newbie Newbie
    Join Date
    Apr 2014
    Posts
    1

    Bad quality bloom

    Hey guys,

    Is there a way to make a good quality bloom ?

    I have increased the bloom samples because it left trails (interlaced) before with radius 13.37. It looks like a 8-bit bloom ( RadiusY=13.37, intensity = 4 ) :

    Click image for larger version. 

Name:	badquality.jpg 
Views:	134 
Size:	7.1 KB 
ID:	1264

    Direct link : zupimages.net/up/14/15/wb9i.png

    The blur shader looks like this (from qeffects-gl) :

    Code :
    static const char g_szVertexShader_BloomBlur[] =
    "#extension GL_ARB_texture_rectangle : enable\n"
    "precision mediump float;\n"
    "uniform vec4 Local0;\n"
    "varying vec4 texCoord[16];\n"
    "void main(void)\n"
    "{\n"
    "texCoord[0] = gl_MultiTexCoord0 + Local0;\n"
    "texCoord[1] = gl_MultiTexCoord0 + Local0 * 1.250;\n"
    "texCoord[2] = gl_MultiTexCoord0 + Local0 * 1.375;\n"
    "texCoord[3] = gl_MultiTexCoord0 + Local0 * 1.500;\n"
    "texCoord[4] = gl_MultiTexCoord0 + Local0 * 1.625;\n"
    "texCoord[5] = gl_MultiTexCoord0 + Local0 * 1.750;\n"
    "texCoord[6] = gl_MultiTexCoord0 + Local0 * 1.875;\n"
    "texCoord[7] = gl_MultiTexCoord0 + Local0 * 2.000;\n"
    "texCoord[8] = gl_MultiTexCoord0 - Local0;\n"
    "texCoord[9] = gl_MultiTexCoord0 - Local0 * 1.250;\n"
    "texCoord[10] = gl_MultiTexCoord0 - Local0 * 1.375;\n"
    "texCoord[11] = gl_MultiTexCoord0 - Local0 * 1.500;\n"
    "texCoord[12] = gl_MultiTexCoord0 - Local0 * 1.625;\n"
    "texCoord[13] = gl_MultiTexCoord0 - Local0 * 1.750;\n"
    "texCoord[14] = gl_MultiTexCoord0 - Local0 * 1.875;\n"
    "texCoord[15] = gl_MultiTexCoord0 - Local0 * 2.000;\n"
    "gl_Position = ftransform();\n"
    "}\n";
     
    static const char g_szFragmentShader_BloomBlur[] =
    "#extension GL_ARB_texture_rectangle : enable\n"
    "precision mediump float;\n"
    "uniform sampler2DRect Texture0;\n"
    "varying vec4 texCoord[16];\n"
    "void main(void)\n"
    "{\n"
    "vec3 col1 = texture2DRect(Texture0, texCoord[0].xy).rgb;\n"
    "vec3 col2 = texture2DRect(Texture0, texCoord[1].xy).rgb;\n"
    "vec3 col3 = texture2DRect(Texture0, texCoord[2].xy).rgb;\n"
    "vec3 col4 = texture2DRect(Texture0, texCoord[3].xy).rgb;\n"
    "vec3 col5 = texture2DRect(Texture0, texCoord[4].xy).rgb;\n"
    "vec3 col6 = texture2DRect(Texture0, texCoord[5].xy).rgb;\n"
    "vec3 col7 = texture2DRect(Texture0, texCoord[6].xy).rgb;\n"
    "vec3 col8 = texture2DRect(Texture0, texCoord[7].xy).rgb;\n"
    "vec3 col9 = texture2DRect(Texture0, texCoord[8].xy).rgb;\n"
    "vec3 col10 = texture2DRect(Texture0, texCoord[9].xy).rgb;\n"
    "vec3 col11 = texture2DRect(Texture0, texCoord[10].xy).rgb;\n"
    "vec3 col12 = texture2DRect(Texture0, texCoord[11].xy).rgb;\n"
    "vec3 col13 = texture2DRect(Texture0, texCoord[12].xy).rgb;\n"
    "vec3 col14 = texture2DRect(Texture0, texCoord[13].xy).rgb;\n"
    "vec3 col15 = texture2DRect(Texture0, texCoord[14].xy).rgb;\n"
    "vec3 col16 = texture2DRect(Texture0, texCoord[15].xy).rgb;\n"
    "gl_FragColor.rgb = gl_FragColor.rgb / 16.0;"
    "gl_FragColor.rgb = (col1 + col2 + col3 + col4 + col5 + col6 + col7 + col8 + col9 + col10 + col11 + col12 + col13 + col14 + col15 + col16) / 16.0;\n"
    "gl_FragColor.a    = 1.0;\n"
    "}\n";

    I'm not sure what newest games use to make a perfect high quality performances bloom :S

    Any ideas ?
    Last edited by Kdeon0; 04-13-2014 at 03:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •