MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / update_uniforms_refraction

Method update_uniforms_refraction

libraries/lib-engine/src/material.cpp:391–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void 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
404void polymer_pbr_bubble::use()
405{

Callers 1

run_forward_passMethod · 0.80

Calls 5

enabledMethod · 0.80
bindMethod · 0.45
textureMethod · 0.45
uniformMethod · 0.45
unbindMethod · 0.45

Tested by

no test coverage detected