guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

Bakery Standard gi.indirect.specular bug #132

Closed z3y closed 2 years ago

z3y commented 2 years ago

This affects all bakery modes in the shader when BAKERY_LMSPEC isnt defined E.g.

float3 prevSpec = gi.indirect.specular;
BakerySH(gi.indirect.diffuse, gi.indirect.specular, i.ambientOrLightmapUV.xy, s.normalWorld, s.eyeVec, s.smoothness);
gi.indirect.specular += prevSpec;

Inside BakerySH function there is #ifdef BAKERY_LMSPEC and if that keyword isnt defined then indirect specular is too high Without the keyword defined its basically doing gi.indirect.specular += gi.indirect.specular;

guycalledfrank commented 2 years ago

Hi. Good catch! Fixed it: https://github.com/guycalledfrank/bakery-csharp/commit/b075427806f9f76000a50176b0506b07ddd5aaef