diff --git a/shader/fullscreen/transparencyComp.frag b/shader/fullscreen/transparencyComp.frag index 1b1de4b16..409af8186 100644 --- a/shader/fullscreen/transparencyComp.frag +++ b/shader/fullscreen/transparencyComp.frag @@ -1,18 +1,18 @@ #version 450 core in vec2 vTexPos; out vec4 fColor; -layout(binding = 0) uniform sampler2D t0; -layout(binding = 1) uniform sampler2D t1; -layout(binding = 2) uniform sampler2D t2; -layout(binding = 3) uniform sampler2D t3; +layout(binding = 0) uniform sampler2D wincol; +layout(binding = 1) uniform sampler2D winpos; +layout(binding = 2) uniform sampler2D cloudcol; +layout(binding = 3) uniform sampler2D cloudpos; vec4 blend (vec4 src, vec4 dst) { return src + (1-src.a) * dst; } void main() { //fColor = texture(t0, vTexPos) + texture(t2, vTexPos); - vec4 x = texture(t0, vTexPos); - float xz = texture(t1, vTexPos).z; - vec4 y = texture(t2, vTexPos); - float yz = texture(t3, vTexPos).z; + vec4 x = texture(wincol, vTexPos); + float xz = texture(winpos, vTexPos).z; + vec4 y = texture(cloudcol, vTexPos); + float yz = texture(cloudpos, vTexPos).z; fColor = ( xz > yz ? blend(x,y) : blend(y,x)) ; } diff --git a/shader/pull/cloud.vert b/shader/pull/cloud.vert index c9c98ae56..6a3977068 100644 --- a/shader/pull/cloud.vert +++ b/shader/pull/cloud.vert @@ -19,6 +19,9 @@ void main() uint k = gl_VertexID % 6; vCol = unpackUnorm4x8(data[i].col); vControls = indices[k]; - vPos = vec3(data[i].pos.xy + 20*vControls, data[i].pos.z); - gl_Position = theMat * vec4(vPos,1); + vec3 vPosx = vec3(data[i].pos.xy + 20*vControls, data[i].pos.z); + gl_Position = theMat * vec4(vPosx,1); + vPos = data[i].pos; + //vPos = vec3(data[i].pos.xy + 20*vControls, data[i].pos.z); + //gl_Position = theMat * vec4(vPos,1); }