]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/pbrmaterial.cpp
Fix the name of the PBR fresnel lookup texture
[libs/gl.git] / source / materials / pbrmaterial.cpp
index 783a8bed2c37eab456e2283e5274d97394fc2075..76683e9f65d51a1e57e67ed66d85919475ee42d5 100644 (file)
@@ -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<Texture2D>(name);
        if(fresnel_lookup)
                return *fresnel_lookup;
@@ -47,6 +47,8 @@ const Texture2D &PbrMaterial::get_or_create_fresnel_lookup()
        const Program &shprog = resources.get<Program>("_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<Mesh>("_fullscreen_quad.mesh");
        Framebuffer fresnel_lookup_fbo;