mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
rm combine
This commit is contained in:
parent
f55e8cc376
commit
c935b6664a
2 changed files with 10 additions and 40 deletions
|
@ -38,7 +38,7 @@
|
||||||
LATEST_VERSION = 11700;
|
LATEST_VERSION = 11700;
|
||||||
VERSION = 11740;
|
VERSION = 11740;
|
||||||
SAVE_VERSION = 11700;
|
SAVE_VERSION = 11700;
|
||||||
VERSION_STRING = "1.17.4.003";
|
VERSION_STRING = "1.17.4.004";
|
||||||
BUILD_NUMBER = 11740;
|
BUILD_NUMBER = 11740;
|
||||||
|
|
||||||
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
||||||
|
|
|
@ -27,6 +27,7 @@ uniform int opLength;
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
uniform int shapeAmount;
|
uniform int shapeAmount;
|
||||||
|
|
||||||
uniform int shape[MAX_SHAPES] ;
|
uniform int shape[MAX_SHAPES] ;
|
||||||
uniform vec3 size[MAX_SHAPES] ;
|
uniform vec3 size[MAX_SHAPES] ;
|
||||||
uniform float radius[MAX_SHAPES] ;
|
uniform float radius[MAX_SHAPES] ;
|
||||||
|
@ -581,7 +582,7 @@ vec4 scene(int index, out float depth, out vec3 coll, out vec3 norm) {
|
||||||
return vec4(0.);
|
return vec4(0.);
|
||||||
|
|
||||||
vec3 c = useTexture[index] == 1?
|
vec3 c = useTexture[index] == 1?
|
||||||
boxmap(int(TEXTURE_S) + index, coll * textureScale[index], norm, triplanar[index]).rgb * diffuseColor[index].rgb :
|
boxmap(int(TEXTURE_S) + index, irotMatrix * coll * textureScale[index], irotMatrix * norm, triplanar[index]).rgb * diffuseColor[index].rgb :
|
||||||
diffuseColor[index].rgb;
|
diffuseColor[index].rgb;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -608,26 +609,6 @@ vec4 scene(int index, out float depth, out vec3 coll, out vec3 norm) {
|
||||||
return vec4(c, 1.);
|
return vec4(c, 1.);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 sceneBlend(float depth, vec4 color, vec3 norm) {
|
|
||||||
if(depth > viewRange.y - EPSILON) // Not hitting anything.
|
|
||||||
return vec4(0.);
|
|
||||||
|
|
||||||
vec3 c = color.rgb;
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
float distNorm = (depth - viewRange.x) / (viewRange.y - viewRange.x);
|
|
||||||
distNorm = 1. - distNorm;
|
|
||||||
distNorm = smoothstep(.0, .3, distNorm);
|
|
||||||
c = mix(c * background.rgb, c, mix(1., distNorm, depthInt));
|
|
||||||
|
|
||||||
vec3 light = normalize(lightPosition);
|
|
||||||
float lamo = min(1., max(0., dot(norm, light)) + ambientIntns);
|
|
||||||
c = mix(c * background.rgb, c, lamo);
|
|
||||||
|
|
||||||
return vec4(c, 1.);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 blend(in vec4 bg, in vec4 fg) {
|
vec4 blend(in vec4 bg, in vec4 fg) {
|
||||||
float al = fg.a + bg.a * (1. - fg.a);
|
float al = fg.a + bg.a * (1. - fg.a);
|
||||||
if(al == 0.) return bg;
|
if(al == 0.) return bg;
|
||||||
|
@ -674,26 +655,15 @@ vec4 operate() {
|
||||||
n2 = norml[top];
|
n2 = norml[top];
|
||||||
|
|
||||||
if(opr == 100) {
|
if(opr == 100) {
|
||||||
if(d1 < yy || d2 < yy) {
|
if(d1 < d2) {
|
||||||
|
color[top] = c1;
|
||||||
if(d1 < d2) {
|
depth[top] = d1;
|
||||||
color[top] = c1;
|
norml[top] = n1;
|
||||||
depth[top] = d1;
|
|
||||||
norml[top] = n1;
|
|
||||||
} else {
|
|
||||||
color[top] = c2;
|
|
||||||
depth[top] = d2;
|
|
||||||
norml[top] = n2;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
color[top] = c2;
|
||||||
color[top] = vec4(0.);
|
depth[top] = d2;
|
||||||
depth[top] = 0.;
|
norml[top] = n2;
|
||||||
norml[top] = vec3(0.);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
top++;
|
top++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue