In oit_depth_sample.glsl, at line 28, function normalizeDepth:
return mappedDepth * (1.0 - 1.0 / COEFF_COUNT);The return value is then multiplied by the same factor again at other two places.
In oit_sample.glsl, at line 20, function evaluateWaveletsCorrected:
depth *= float(COEFF_COUNT - 1) / COEFF_COUNT;And in oit_add_transmittance.glsl, at line 16, function addTransmittance:
depth *= float(COEFF_COUNT - 1) / COEFF_COUNT;This mistake may cause a drop in accuracy. I suggest to remove the latter two line of codes.
I applied this solution to a resource pack, and the game works properly. So I suspect that the current implementation is not intended.
Attachments
Comments 4
Addition: in oit_sampple.glsl, between lines 17~20, this multiplier is wrongly applied after the first use of depth
float scaleCoeffAddend = (currentAbsorbance * -depth) + currentAbsorbance;
scaleCoeff -= scaleCoeffAddend;
depth *= float(COEFF_COUNT - 1) / COEFF_COUNT;Hi!
Thank you for your report!ย
Can you elaborate on why would it be considered as a bug? What impact on Player it has?
Can you also point differences between these two screenshots?
Quick Links:ย
๐โฏIssue Guidelinesโฏโ ๐ฌโฏMojang Supportโฏโ ๐งโฏSuggestionsโฏโ ๐โฏMinecraft Wiki
Thank you for helping us improve Minecraft! We saved your files: