diff --git a/shaders/composite1.fsh b/shaders/composite1.fsh index 331bf6b..80b3241 100644 --- a/shaders/composite1.fsh +++ b/shaders/composite1.fsh @@ -38,7 +38,7 @@ uniform sampler2D colortex11; // specular uniform sampler2D colortex10; // specular uniform sampler2D colortex12; // specular uniform sampler2D colortex13; // specular -// uniform sampler2D colortex14; // specular +uniform sampler2D colortex14; uniform sampler2D colortex15; // specular uniform sampler2D colortex16; // specular uniform sampler2D depthtex1;//depth @@ -262,7 +262,6 @@ void waterVolumetrics(inout vec3 inColor, vec3 rayStart, vec3 rayEnd, float estE vec3 wpos = mat3(gbufferModelViewInverse) * rayStart + gbufferModelViewInverse[3].xyz; vec3 dVWorld = (wpos-gbufferModelViewInverse[3].xyz); - // vec3 progressW = gbufferModelViewInverse[3].xyz+cameraPosition; float expFactor = 11.0; for (int i=0;icomposite4) - -const int colortex13Format = RGBA8; //Final output, transparencies id (gbuffer->composite4) const int colortex6Format = R11F_G11F_B10F; //additionnal buffer for bloom (composite3->final) const int colortex7Format = RGBA8; //Final output, transparencies id (gbuffer->composite4) @@ -30,6 +27,9 @@ const int colortex8Format = RGBA16F; //Final output, transparencies id (gbuffe const int colortex9Format = RGBA8; //Final output, transparencies id (gbuffer->composite4) const int colortex10Format = RGBA16F; //Final output, transparencies id (gbuffer->composite4) +const int colortex11Format = RGBA16; //Final output, transparencies id (gbuffer->composite4) +const int colortex13Format = RGBA8; //Final output, transparencies id (gbuffer->composite4) +const int colortex14Format = RGBA8; //Final output, transparencies id (gbuffer->composite4) // const int colortex15Format = RGBA16F; // flat normals and vanilla */ diff --git a/shaders/gbuffers_all_translucent.fsh b/shaders/gbuffers_all_translucent.fsh index 8455618..c388bcd 100644 --- a/shaders/gbuffers_all_translucent.fsh +++ b/shaders/gbuffers_all_translucent.fsh @@ -261,7 +261,7 @@ vec3 GGX (vec3 n, vec3 v, vec3 l, float r, vec3 F0) { //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// -/* RENDERTARGETS:2,7,11 */ +/* RENDERTARGETS:2,7,11,14 */ void main() { if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize.y < RENDER_SCALE.y ) { vec2 tempOffset = offsets[framemod8]; @@ -479,5 +479,7 @@ if (gl_FragCoord.x * texelSize.x < RENDER_SCALE.x && gl_FragCoord.y * texelSize #ifndef HAND gl_FragData[1] = vec4(Albedo,iswater); #endif + + gl_FragData[3].a = lmtexcoord.w; } } \ No newline at end of file diff --git a/shaders/lib/volumetricClouds.glsl b/shaders/lib/volumetricClouds.glsl index f11a4f3..19c8d1e 100644 --- a/shaders/lib/volumetricClouds.glsl +++ b/shaders/lib/volumetricClouds.glsl @@ -27,7 +27,7 @@ float MaxCumulusHeight = CumulusHeight + 100; float AltostratusHeight = 2000; float rainCloudwetness = rainStrength; -float cloud_movement = 0; +float cloud_movement = frameTimeCounter; //3D noise from 2d texture float densityAtPos(in vec3 pos){ @@ -46,8 +46,15 @@ float densityAtPos(in vec3 pos){ float cloudCov(in vec3 pos,vec3 samplePos){ - float CloudLarge = texture2D(noisetex, (samplePos.xz + cloud_movement) / 5000 ).b; - float CloudSmall = texture2D(noisetex, (samplePos.xz - cloud_movement) / 500 ).r; + // vec2 windshift2 = pow( max(MaxCumulusHeight - pos.y, 0.0) / 20,2) * vec2(1); + // windshift.x *= sin(frameTimeCounter); + // windshift.y *= -cos(frameTimeCounter); + + float CloudLarge = texture2D(noisetex, (samplePos.xz + cloud_movement) / 5000 ).b; + + + vec2 windshift = pow( max(pos.y-CumulusHeight, 0.0) / 5,1.5) * vec2(1) * (CloudLarge*2-1.15); + float CloudSmall = texture2D(noisetex, (samplePos.xz - cloud_movement) / 500 ).r; float coverage = abs(pow(CloudLarge,1)*2.0 - 1.2)*0.5 - (1.0-CloudSmall) + 0.3; @@ -74,6 +81,8 @@ float cloudVol(in vec3 pos,in vec3 samplePos,in float cov, in int LoD){ float pw2 = log(fbmPower2); samplePos.xz -= cloud_movement/4; + samplePos.xz += pow( max(pos.y - (CumulusHeight+20), 0.0) / 20.0,1.50); + noise += 1.0-densityAtPos(samplePos * 200.) ; float smallnoise = densityAtPos(samplePos * 600.); @@ -101,8 +110,8 @@ float GetCumulusDensity(in vec3 pos, in int LoD){ float GetAltostratusDensity(vec3 pos){ - float large = texture2D(noisetex, pos.xz/100000. ).b; - float small = texture2D(noisetex, pos.xz/10000. - vec2(-large,1-large)/5).b; + float large = texture2D(noisetex, (pos.xz + cloud_movement)/100000. ).b; + float small = texture2D(noisetex, (pos.xz - cloud_movement)/10000. - vec2(-large,1-large)/5).b; float shape = (small + pow((1.0-large),2.0))/2.0;