Skip to content

Commit

Permalink
refactor: use 5.0 as RGBM from editor
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxudong committed Jan 3, 2024
1 parent a4d1d8a commit e977410
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/shaderlib/pbr/pbr_frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ addTotalDirectRadiance(geometry, material, reflectedLight);
// IBL diffuse
#ifdef MATERIAL_HAS_LIGHTMAP
vec4 lightmapColor= texture2D(material_Lightmap, v_lightmapUV);
// @TODO: use RGBM format from editor bake workflow.
vec3 irradiance = RGBMToLinear(lightmapColor, 1.0).rgb;
vec3 irradiance = RGBMToLinear(lightmapColor, 5.0).rgb;
#ifdef MATERIAL_HAS_DIRLIGHTMAP
vec4 dirLightmapColor = texture2D (material_DirLightmap, v_lightmapUV);
irradiance = DecodeDirectionalLightmap (irradiance, dirLightmapColor, geometry.normal);
Expand Down

0 comments on commit e977410

Please sign in to comment.