rm combine

This commit is contained in:
Tanasart 2024-06-14 18:47:50 +07:00
parent f55e8cc376
commit c935b6664a
2 changed files with 10 additions and 40 deletions

View File

@ -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;

View File

@ -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,8 +655,6 @@ vec4 operate() {
n2 = norml[top]; n2 = norml[top];
if(opr == 100) { if(opr == 100) {
if(d1 < yy || d2 < yy) {
if(d1 < d2) { if(d1 < d2) {
color[top] = c1; color[top] = c1;
depth[top] = d1; depth[top] = d1;
@ -685,15 +664,6 @@ vec4 operate() {
depth[top] = d2; depth[top] = d2;
norml[top] = n2; norml[top] = n2;
} }
} else {
color[top] = vec4(0.);
depth[top] = 0.;
norml[top] = vec3(0.);
}
top++; top++;
} }
} }