|
|
@@ -1546,7 +1546,7 @@ void Render::Draw3D() |
|
|
|
fbo_blur_h->Bind(); |
|
|
|
shader_blur_h->Bind(); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_back->GetTexture(), 0); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, glow_large / screen_size.x); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, glow_large / (float)screen_size.x); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_h->Unbind(); |
|
|
|
fbo_blur_h->Unbind(); |
|
|
@@ -1554,7 +1554,7 @@ void Render::Draw3D() |
|
|
|
fbo_blur_v->Bind(); |
|
|
|
shader_blur_v->Bind(); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_blur_h->GetTexture(), 0); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, glow_large / screen_size.y); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, glow_large / (float)screen_size.y); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_v->Unbind(); |
|
|
|
fbo_blur_v->Unbind(); |
|
|
@@ -1562,7 +1562,7 @@ void Render::Draw3D() |
|
|
|
fbo_blur_h->Bind(); |
|
|
|
shader_blur_h->Bind(); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_blur_v->GetTexture(), 0); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, glow_small / screen_size.x); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, glow_small / (float)screen_size.x); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_h->Unbind(); |
|
|
|
fbo_blur_h->Unbind(); |
|
|
@@ -1570,7 +1570,7 @@ void Render::Draw3D() |
|
|
|
fbo_blur_v->Bind(); |
|
|
|
shader_blur_v->Bind(); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_blur_h->GetTexture(), 0); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, glow_small / screen_size.y); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, glow_small / (float)screen_size.y); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_v->Unbind(); |
|
|
|
fbo_blur_v->Unbind(); |
|
|
@@ -1637,7 +1637,7 @@ void Render::Draw3D() |
|
|
|
fbo_tmp->Bind(); |
|
|
|
shader_blur_h->Bind(); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_texture, fbo_screen->GetTexture(), 0); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, blur / screen_size.x); |
|
|
|
shader_blur_h->SetUniform(shader_blur_h_radius, blur / (float)screen_size.x); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_h->Unbind(); |
|
|
|
fbo_tmp->Unbind(); |
|
|
@@ -1645,7 +1645,7 @@ void Render::Draw3D() |
|
|
|
fbo_screen->Bind(); |
|
|
|
shader_blur_v->Bind(); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_texture, fbo_tmp->GetTexture(), 0); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, blur / screen_size.y); |
|
|
|
shader_blur_v->SetUniform(shader_blur_v_radius, blur / (float)screen_size.y); |
|
|
|
TraceQuad(); |
|
|
|
shader_blur_v->Unbind(); |
|
|
|
fbo_screen->Unbind(); |
|
|
@@ -1658,20 +1658,20 @@ void Render::Draw3D() |
|
|
|
shader_postfx->Bind(); |
|
|
|
shader_postfx->SetUniform(shader_postfx_texture, fbo_screen->GetTexture(), 0); |
|
|
|
shader_postfx->SetUniform(shader_postfx_screen_size, (vec2)screen_size); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ratio_2d, (vec2)ratio_2d / 2); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ratio_2d, (vec2)ratio_2d * 0.5f); |
|
|
|
shader_postfx->SetUniform(shader_postfx_time, fx_angle); |
|
|
|
shader_postfx->SetUniform(shader_postfx_deform, postfx_deform); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.xyz * 0.01, postfx_ghost1.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.xyz * 0.01, postfx_ghost2.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.xy * 0.01, postfx_glass.z * 0.1, postfx_glass.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ghost1, vec4(postfx_ghost1.xyz * 0.01f, postfx_ghost1.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_ghost2, vec4(postfx_ghost2.xyz * 0.01f, postfx_ghost2.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_glass, vec4(postfx_glass.xy * 0.01f, postfx_glass.z * 0.1f, postfx_glass.w)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_gradient, postfx_gradient); |
|
|
|
shader_postfx->SetUniform(shader_postfx_gradient_color, postfx_gradient_color); |
|
|
|
shader_postfx->SetUniform(shader_postfx_vignetting, postfx_vignetting); |
|
|
|
shader_postfx->SetUniform(shader_postfx_aberration, postfx_aberration); |
|
|
|
shader_postfx->SetUniform(shader_postfx_moire_h, vec4(postfx_moire_h.xyz, postfx_moire_h.w * 2 * M_PI)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_moire_v, vec4(postfx_moire_v.xyz, postfx_moire_v.w * 2 * M_PI)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_scanline_h, vec4(postfx_scanline_h.xyz, postfx_scanline_h.w * 2 * M_PI)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_scanline_v, vec4(postfx_scanline_v.xyz, postfx_scanline_v.w * 2 * M_PI)); |
|
|
|
shader_postfx->SetUniform(shader_postfx_moire_h, vec4(postfx_moire_h.xyz, postfx_moire_h.w * (float)(2 * M_PI))); |
|
|
|
shader_postfx->SetUniform(shader_postfx_moire_v, vec4(postfx_moire_v.xyz, postfx_moire_v.w * (float)(2 * M_PI))); |
|
|
|
shader_postfx->SetUniform(shader_postfx_scanline_h, vec4(postfx_scanline_h.xyz, postfx_scanline_h.w * (float)(2 * M_PI))); |
|
|
|
shader_postfx->SetUniform(shader_postfx_scanline_v, vec4(postfx_scanline_v.xyz, postfx_scanline_v.w * (float)(2 * M_PI))); |
|
|
|
shader_postfx->SetUniform(shader_postfx_corner, postfx_corner); |
|
|
|
shader_postfx->SetUniform(shader_postfx_sync, (float)fabs(sync_value * cosf((main_angle - sync_angle) * 6.0f))); |
|
|
|
shader_postfx->SetUniform(shader_postfx_beat, (float)fabs(beat_value * cosf((main_angle - beat_angle) * 6.0f))); |
|
|
|