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

Method update_uniforms_ibl

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

Source from the content-addressed store, hash-verified

273}
274
275void polymer_pbr_standard::update_uniforms_ibl(GLuint irradiance, GLuint radiance, GLuint dfg_lut)
276{
277 resolve_variants();
278 gl_shader & program = compiled_shader->shader;
279 if (!compiled_shader->enabled("USE_IMAGE_BASED_LIGHTING")) throw std::runtime_error("should not be called unless USE_IMAGE_BASED_LIGHTING is defined.");
280
281 program.bind();
282 program.texture("sc_irradiance", bindpoint++, irradiance, GL_TEXTURE_CUBE_MAP);
283 program.texture("sc_radiance", bindpoint++, radiance, GL_TEXTURE_CUBE_MAP);
284 program.texture("s_dfg_lut", bindpoint++, dfg_lut, GL_TEXTURE_2D);
285 program.unbind();
286}
287
288void polymer_pbr_standard::update_uniforms_shadow(GLuint handle)
289{

Callers 1

run_forward_passMethod · 0.80

Calls 4

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

Tested by

no test coverage detected