Handle ldr envmaps
This commit is contained in:
parent
3288c4d804
commit
559567de37
|
@ -194,6 +194,9 @@ void main() {
|
|||
#ifdef _EnvTex
|
||||
vec3 n = normalize(normal);
|
||||
vec3 R = texture(envmap, envMapEquirect(n)).rgb * envmapStrength;
|
||||
#ifdef _EnvLDR
|
||||
R = pow(R, vec3(2.2));
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -214,9 +217,6 @@ void main() {
|
|||
float gamma_val = acos(cos_gamma);
|
||||
|
||||
vec3 R = Z * hosekWilkie(cos_theta, gamma_val, cos_gamma) * envmapStrength;
|
||||
// #ifndef _LDR
|
||||
// R = pow(R, vec3(2.2));
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
#ifdef _EnvClouds
|
||||
|
|
|
@ -148,8 +148,6 @@ def parse_color(world, node, context, envmap_strength_const):
|
|||
log.warn(world.name + ' - unable to open ' + image.filepath)
|
||||
return
|
||||
|
||||
envmap_strength_const['float'] *= 2.0 # Match to cycles
|
||||
|
||||
tex = {}
|
||||
context['bind_textures'].append(tex)
|
||||
tex['name'] = 'envmap'
|
||||
|
|
Loading…
Reference in a new issue