| 389 | } |
| 390 | |
| 391 | void polymer_pbr_bubble::update_uniforms_refraction(GLuint scene_color, GLuint scene_depth, float2 resolution) |
| 392 | { |
| 393 | resolve_variants(); |
| 394 | gl_shader & program = compiled_shader->shader; |
| 395 | if (!compiled_shader->enabled("USE_SCREEN_SPACE_REFRACTION")) throw std::runtime_error("should not be called unless USE_SCREEN_SPACE_REFRACTION is defined."); |
| 396 | |
| 397 | program.bind(); |
| 398 | program.texture("s_sceneColor", bindpoint++, scene_color, GL_TEXTURE_2D); |
| 399 | program.texture("s_sceneDepth", bindpoint++, scene_depth, GL_TEXTURE_2D); |
| 400 | program.uniform("u_screenResolution", resolution); |
| 401 | program.unbind(); |
| 402 | } |
| 403 | |
| 404 | void polymer_pbr_bubble::use() |
| 405 | { |