Skip to content

Commit

Permalink
[Shaders/Cook-Torrance] Emissive map's pixel values are gamma corrected
Browse files Browse the repository at this point in the history
- The emissive texture is supposed to be in sRGB
  • Loading branch information
Razakhel committed Dec 15, 2023
1 parent de0574f commit 53a064f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shaders/cook-torrance.frag
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void main() {
}

vec3 ambient = vec3(0.03) * albedo * ambOcc;
vec3 emissive = texture(uniMaterial.emissiveMap, vertMeshInfo.vertTexcoords).rgb * uniMaterial.emissive;
vec3 emissive = pow(texture(uniMaterial.emissiveMap, vertMeshInfo.vertTexcoords).rgb, vec3(2.2)) * uniMaterial.emissive;
vec3 color = ambient + lightRadiance + emissive;

// HDR tone mapping
Expand Down

0 comments on commit 53a064f

Please sign in to comment.