X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Fpbrmaterial.cpp;h=082218161dd3067846bf42463729323b2fa27f4d;hb=5b652353d545a3190ea2d86ba82a87b2e3382a0d;hp=783a8bed2c37eab456e2283e5274d97394fc2075;hpb=e05c77d2e3582a6962f42dcec0fc5f7845ff448d;p=libs%2Fgl.git diff --git a/source/materials/pbrmaterial.cpp b/source/materials/pbrmaterial.cpp index 783a8bed..08221816 100644 --- a/source/materials/pbrmaterial.cpp +++ b/source/materials/pbrmaterial.cpp @@ -35,7 +35,7 @@ const Texture2D &PbrMaterial::get_or_create_fresnel_lookup() { Resources &resources = Resources::get_global(); - static const string name = "_pbr_env_fresnel_lookup.tex2d"; + static const string name = "_pbr_fresnel_lookup.tex2d"; Texture2D *fresnel_lookup = resources.find(name); if(fresnel_lookup) return *fresnel_lookup; @@ -47,6 +47,8 @@ const Texture2D &PbrMaterial::get_or_create_fresnel_lookup() const Program &shprog = resources.get("_pbr_fresnel_lookup.glsl.shader"); ProgramData shdata; shdata.uniform("n_samples", 1024); + // Not actually used here, but put it in to satisfy the interface + shdata.uniform("roughness", 0.0f); const Mesh &mesh = resources.get("_fullscreen_quad.mesh"); Framebuffer fresnel_lookup_fbo; @@ -72,19 +74,6 @@ void PbrMaterial::fill_program_info(string &module_name, map &spec_ spec_values["use_emission_map"] = (emission.texture!=0); } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -void PbrMaterial::attach_textures_to(Texturing &texturing, ProgramData &tex_shdata) const -{ - attach_texture_to(base_color.texture, texturing, tex_shdata, "base_color_map"); - attach_texture_to(metalness.texture, texturing, tex_shdata, "metalness_map"); - attach_texture_to(roughness.texture, texturing, tex_shdata, "roughness_map"); - attach_texture_to(normal.texture, texturing, tex_shdata, "normal_map"); - attach_texture_to(occlusion.texture, texturing, tex_shdata, "occlusion_map"); - attach_texture_to(emission.texture, texturing, tex_shdata, "emission_map"); -} -#pragma GCC diagnostic pop - const Texture *PbrMaterial::get_texture(Tag tag) const { if(tag==texture_tags[0])