OpenGL2: Use RGBM instead of RGBE encoding for lightmaps.
This commit is contained in:
parent
7e875c6941
commit
e80faf812e
4 changed files with 26 additions and 38 deletions
|
@ -20,8 +20,8 @@ void main()
|
|||
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
|
||||
#if defined(USE_LIGHTMAP)
|
||||
vec4 color2 = texture2D(u_LightMap, var_LightTex);
|
||||
#if defined(RGBE_LIGHTMAP)
|
||||
color2.rgb *= exp2(color2.a * 255.0 - 128.0);
|
||||
#if defined(RGBM_LIGHTMAP)
|
||||
color2.rgb *= 32.0 * color2.a;
|
||||
color2.a = 1.0;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue