Create/Update assets for version 20w22a

This commit is contained in:
InventiveBot
2020-05-29 14:41:37 +00:00
parent f5f1919d60
commit 0f3d8458da
5752 changed files with 336622 additions and 71827 deletions

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -7,9 +7,9 @@ varying vec2 oneTexel;
uniform vec2 InSize;
uniform float Resolution = 4.0;
uniform float Saturation = 1.5;
uniform float MosaicSize = 8.0;
uniform float Resolution;
uniform float Saturation;
uniform float MosaicSize;
void main() {
vec2 mosaicInSize = InSize / MosaicSize;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -16,16 +16,16 @@ void main() {
float totalAlpha = 0.0;
float totalSamples = 0.0;
for(float r = -Radius; r <= Radius; r += 1.0) {
vec4 sample = texture2D(DiffuseSampler, texCoord + oneTexel * r * BlurDir);
vec4 sampleValue = texture2D(DiffuseSampler, texCoord + oneTexel * r * BlurDir);
// Accumulate average alpha
totalAlpha = totalAlpha + sample.a;
totalAlpha = totalAlpha + sampleValue.a;
totalSamples = totalSamples + 1.0;
// Accumulate smoothed blur
float strength = 1.0 - abs(r / Radius);
totalStrength = totalStrength + strength;
blurred = blurred + sample;
blurred = blurred + sampleValue;
}
gl_FragColor = vec4(blurred.rgb / (Radius * 2.0 + 1.0), totalAlpha);
}

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -29,6 +29,6 @@ void main(){
f += (du * i) - (dd * i);
f += (dr * i) - (dl * i);
vec4 color = c * clamp(f, 0.5, 2);
vec4 color = c * clamp(f, 0.5, 2.0);
gl_FragColor = vec4(color.rgb, 1.0);
}

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -7,13 +7,13 @@ varying vec2 oneTexel;
uniform vec2 InSize;
uniform vec3 Gray = vec3(0.3, 0.59, 0.11);
uniform vec3 RedMatrix = vec3(1.0, 0.0, 0.0);
uniform vec3 GreenMatrix = vec3(0.0, 1.0, 0.0);
uniform vec3 BlueMatrix = vec3(0.0, 0.0, 1.0);
uniform vec3 Offset = vec3(0.0, 0.0, 0.0);
uniform vec3 ColorScale = vec3(1.0, 1.0, 1.0);
uniform float Saturation = 1.8;
uniform vec3 Gray;
uniform vec3 RedMatrix;
uniform vec3 GreenMatrix;
uniform vec3 BlueMatrix;
uniform vec3 Offset;
uniform vec3 ColorScale;
uniform float Saturation;
void main() {
vec4 InTexel = texture2D(DiffuseSampler, texCoord);

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -7,10 +7,10 @@ varying vec2 oneTexel;
uniform vec2 InSize;
uniform vec3 ConvergeX = vec3(-1.0, 0.0, 0.5);
uniform vec3 ConvergeY = vec3( 0.0, -1.0, 0.5);
uniform vec3 RadialConvergeX = vec3(1.0, 1.0, 1.0);
uniform vec3 RadialConvergeY = vec3(1.0, 1.0, 1.0);
uniform vec3 ConvergeX;
uniform vec3 ConvergeY;
uniform vec3 RadialConvergeX;
uniform vec3 RadialConvergeY;
void main() {
vec3 CoordX = texCoord.x * RadialConvergeX;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,3 +1,4 @@
#version 110
#extension GL_EXT_gpu_shader4 : enable
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D DitherSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D BaseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D OutlineSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D OverlaySampler;
@@ -7,10 +7,10 @@ uniform vec2 InSize;
varying vec2 texCoord;
uniform float MosaicSize = 1.0;
uniform vec3 RedMatrix = vec3(1.0, 0.0, 0.0);
uniform vec3 GreenMatrix = vec3(0.0, 1.0, 0.0);
uniform vec3 BlueMatrix = vec3(0.0, 0.0, 1.0);
uniform float MosaicSize;
uniform vec3 RedMatrix;
uniform vec3 GreenMatrix;
uniform vec3 BlueMatrix;
void main(){
vec2 mosaicInSize = InSize / MosaicSize;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D PrevSampler;
@@ -8,8 +8,7 @@ varying vec2 oneTexel;
uniform vec2 InSize;
uniform vec3 Phosphor = vec3(0.7, 0.7, 0.7);
uniform float LerpFactor = 1.0;
uniform vec3 Phosphor;
void main() {
vec4 CurrTexel = texture2D(DiffuseSampler, texCoord);

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -0,0 +1,14 @@
#version 110
attribute vec4 Position;
uniform mat4 ProjMat;
uniform vec2 OutSize;
varying vec2 texCoord;
void main() {
vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0);
gl_Position = vec4(outPos.xy, 0.2, 1.0);
texCoord = Position.xy / OutSize;
}

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
attribute vec4 Position;

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
uniform sampler2D BlurSampler;

View File

@@ -0,0 +1,176 @@
#version 110
//#define DEBUG_DEPTH
//#define DEBUG_ALPHA
//#define DEBUG_COLOR
uniform sampler2D DiffuseSampler;
uniform sampler2D DiffuseDepthSampler;
uniform sampler2D TranslucentSampler;
uniform sampler2D TranslucentDepthSampler;
uniform sampler2D ItemEntitySampler;
uniform sampler2D ItemEntityDepthSampler;
uniform sampler2D ParticlesSampler;
uniform sampler2D ParticlesDepthSampler;
uniform sampler2D WeatherSampler;
uniform sampler2D WeatherDepthSampler;
uniform sampler2D CloudsSampler;
uniform sampler2D CloudsDepthSampler;
varying vec2 texCoord;
vec3 blend(vec3 destination, vec4 source) {
return (destination * (1.0 - source.a)) + source.rgb;
}
#ifdef DEBUG_DEPTH
vec3 debugDepth(vec3 destination, vec2 uv);
#endif
#ifdef DEBUG_ALPHA
vec3 debugAlpha(vec3 destination, vec2 uv);
#endif
#ifdef DEBUG_COLOR
vec3 debugColor(vec3 destination, vec2 uv);
#endif
struct Layer {
vec4 color;
float depth;
};
#define NUM_LAYERS 6
Layer layers[NUM_LAYERS];
int layerIndices[NUM_LAYERS];
void init_arrays() {
layers[0] = Layer(vec4(texture2D(DiffuseSampler, texCoord).rgb, 1.0), texture2D(DiffuseDepthSampler, texCoord).r);
layers[1] = Layer(texture2D(TranslucentSampler, texCoord), texture2D(TranslucentDepthSampler, texCoord).r);
layers[2] = Layer(texture2D(ItemEntitySampler, texCoord), texture2D(ItemEntityDepthSampler, texCoord).r);
layers[3] = Layer(texture2D(ParticlesSampler, texCoord), texture2D(ParticlesDepthSampler, texCoord).r);
layers[4] = Layer(texture2D(WeatherSampler, texCoord), texture2D(WeatherDepthSampler, texCoord).r);
layers[5] = Layer(texture2D(CloudsSampler, texCoord), texture2D(CloudsDepthSampler, texCoord).r);
for (int ii = 0; ii < NUM_LAYERS; ++ii) {
layerIndices[ii] = ii;
}
for (int ii = 0; ii < NUM_LAYERS; ++ii) {
for (int jj = 0; jj < NUM_LAYERS - ii - 1; ++jj) {
if (layers[layerIndices[jj]].depth < layers[layerIndices[jj + 1]].depth) {
int temp = layerIndices[jj];
layerIndices[jj] = layerIndices[jj + 1];
layerIndices[jj + 1] = temp;
}
}
}
}
void main() {
init_arrays();
vec3 OutTexel = vec3(0.0);
for (int ii = 0; ii < NUM_LAYERS; ++ii) {
OutTexel = blend(OutTexel, layers[layerIndices[ii]].color);
}
#ifdef DEBUG_DEPTH
OutTexel = debugDepth(OutTexel, texCoord);
#endif
#ifdef DEBUG_ALPHA
OutTexel = debugAlpha(OutTexel, texCoord);
#endif
#ifdef DEBUG_COLOR
OutTexel = debugColor(OutTexel, texCoord);
#endif
gl_FragColor = vec4(OutTexel.rgb, 1.0);
}
#ifdef DEBUG_DEPTH
vec3 debugDepth(vec3 destination, vec2 uv) {
if (uv.x >= 0.75) {
uv.x -= 0.75;
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = vec3(pow(texture2D(DiffuseDepthSampler, uv).r, 128.0));
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = vec3(pow(texture2D(TranslucentDepthSampler, uv).r, 128.0));
}
} else if (uv.x <= 0.25) {
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = vec3(pow(texture2D(ItemEntityDepthSampler, uv).r, 128.0));
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = vec3(pow(texture2D(ParticlesDepthSampler, uv).r, 128.0));
}
}
return destination;
}
#endif
#ifdef DEBUG_ALPHA
vec3 debugAlpha(vec3 destination, vec2 uv) {
if (uv.x >= 0.75) {
uv.x -= 0.75;
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = texture2D(DiffuseSampler, uv).aaa;
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = texture2D(TranslucentSampler, uv).aaa;
}
} else if (uv.x <= 0.25) {
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = texture2D(ItemEntitySampler, uv).aaa;
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = texture2D(ParticlesSampler, uv).aaa;
}
}
return destination;
}
#endif
#ifdef DEBUG_COLOR
vec3 debugColor(vec3 destination, vec2 uv) {
if (uv.x >= 0.75) {
uv.x -= 0.75;
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = texture2D(DiffuseSampler, uv).rgb;
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = texture2D(TranslucentSampler, uv).rgb;
}
} else if (uv.x <= 0.25) {
uv.x *= 4.0;
if (uv.y <= 0.25) {
uv.y *= 4.0;
destination = texture2D(ItemEntitySampler, uv).rgb;
} else if (uv.y >= 0.75) {
uv.y -= 0.75;
uv.y *= 4.0;
destination = texture2D(ParticlesSampler, uv).rgb;
}
}
return destination;
}
#endif

View File

@@ -0,0 +1,29 @@
{
"blend": {
"func": "add",
"srcrgb": "one",
"dstrgb": "zero"
},
"vertex": "screenquad",
"fragment": "transparency",
"attributes": [ "Position" ],
"samplers": [
{ "name": "DiffuseSampler" },
{ "name": "DiffuseDepthSampler" },
{ "name": "TranslucentSampler" },
{ "name": "TranslucentDepthSampler" },
{ "name": "ItemEntitySampler" },
{ "name": "ItemEntityDepthSampler" },
{ "name": "ParticlesSampler" },
{ "name": "ParticlesDepthSampler" },
{ "name": "CloudsSampler" },
{ "name": "CloudsDepthSampler" },
{ "name": "WeatherSampler" },
{ "name": "WeatherDepthSampler" }
],
"uniforms": [
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "InSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
{ "name": "OutSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }
]
}

View File

@@ -1,4 +1,4 @@
#version 120
#version 110
uniform sampler2D DiffuseSampler;
@@ -14,8 +14,8 @@ uniform vec2 WobbleAmount;
vec3 hue(float h)
{
float r = abs(h * 6.0 - 3.0) - 1.0;
float g = 2 - abs(h * 6.0 - 2.0);
float b = 2 - abs(h * 6.0 - 4.0);
float g = 2.0 - abs(h * 6.0 - 2.0);
float b = 2.0 - abs(h * 6.0 - 4.0);
return clamp(vec3(r,g,b), 0.0, 1.0);
}
@@ -29,7 +29,7 @@ vec3 RGBtoHSV(vec3 rgb) {
float min = min(rgb.r, min(rgb.g, rgb.b));
float c = hsv.z - min;
if (c != 0)
if (c != 0.0)
{
hsv.y = c / hsv.z;
vec3 delta = (hsv.z - rgb) / c;