The code in shadertoy is the one i actually use. ]]>

I was experimenting with tonemapping for my Unity game and came up with formula below. It`s damn simple but I found the result very satisfying. Could you please give it a look?

vec3 logToneMap(vec3 c, float limit){

float luma = dot(c, vec3(0.2126, 0.7152, 0.0722));

float luma2 = log(luma + 1.0) / log(limit + 1.0);

c *= luma2 / luma;

return c;

}

In my scene it lacked contrast in middle range so i added this dirty hack. though i suppose it should not be needed.

float hackyContrast(float x, float coef){

float s_curve = x * x * (3 – 2 * x);

return mix(x, s_curve, coef);

}

I also included my tonemapping formula into your tonemapping demo on shadertoy.com. its number three from the botton

]]>Still hacking the PSX! nice!

Just saying thanks for the Net Yaroze stuff you shared!

Nearly 20 years later, I’ve finally gotten round to doing a game! ]]>

I like your variance reduction idea. I was planning to do something almost identical myself, but had not gotten around to it. I was going to keep a running sample-variance buffer for each pixel and progressive shoot more rays at the high ones until the 1-sigma value dropped between a LDR color threshold.

]]>it took me a while to figure out a proper value for the cutoff. At first, my value was too high and as a result I could not see any light contribution (attenuation was close to zero).

I finally came up with the following formula, based on the light’s radius and maximum range:

float denom = range + radius;

float cutoff = ( radius * radius ) / ( denom * denom );

This is derived from your formula’s and therefor fully compatible.

-Paul

]]>Can you contact me on swchuck@gmail.com re TMS1000 code.Thks

Charles Harris ]]>

I have not made any progress on this project. Anything new on your project re TMS1000 ?

In the comments on that page ‘Paul’ has commented re TMS1000 coding for Simon. How do I find a contact for Paul ?

Thanks and regards

Charles Harris