Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: SaMMy on October 11, 2016, 12:51:36 PM




Title: need help with adding sunSky to Effies GI2
Post by: SaMMy on October 11, 2016, 12:51:36 PM
HiHo,

after i bought a new laptop with an nvidia 940m , finaly i'm ready to play with fragmentarium too (after years with my very old AGP-FX5600<---LOOL), Whoow, what a difference  :), my love for doing 3d-fractals is coming back ^-^.
And the photorealism of pics, rendered with this sky-pathtracer-model blow me away (but not much options like fog or floor). I also played a lot with effies G.I. (fog, floor, materials) but without this great sun-sky Atmosphere.
I tried to learn by copy/paste and look what happen but with no luck so I started to read about glsl language, shaders and fragmentarium.  :alien: This will be a loong way.

I made it to see the sun-sky atmo in effiesGI2, but now the horizont is vertical instead of horizontal  :hurt:.
Fortunately most var-names are identical in both frags, so mainly  I changed the following in EffiesGI2.frag from:

Code:
vec3 getBackground( in vec3 rd ){
return skyColor+rd*0.1+sunColor*(max(0.0,dot(rd,sunDirection))*0.2+pow(max(0.0,dot(rd,sunDirection)),256.0)*2.0);
}

to

Code:
vec3 getBackground( in vec3 rd ){
return sunsky(rd);
}

I attached the both frags. , every little help is appreciated, thx...


Title: Re: need help with adding sunSky to Effies GI2
Post by: Crist-JRoger on October 11, 2016, 10:18:52 PM
 :) I has the same ideas for DE-renderer, yeah sunsky looks cool.
For now I use this little sky code from https://www.shadertoy.com/view/MdcSzX
Code:
vec3 getSkyColor(vec3 e) {
    e.y = max(e.y,0.0);
    vec3 ret;
    ret.x = pow(1.0-e.y,2.0);
    ret.y = 1.0-e.y;
    ret.z = 0.6+(1.0-e.y)*0.4;
    return ret;
}