Cleanup
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#version 450
|
||||
#include "../Libraries/armorbase/Shaders/std/gbuffer.glsl"
|
||||
in vec3 wnormal;
|
||||
in vec4 wvpposition;
|
||||
in vec4 prevwvpposition;
|
||||
out vec4 fragColor[3];
|
||||
void main() {
|
||||
vec3 n = normalize(wnormal);
|
||||
vec3 basecol;
|
||||
float roughness;
|
||||
float metallic;
|
||||
float occlusion;
|
||||
float emission;
|
||||
basecol = vec3(0.800000011920929, 0.800000011920929, 0.800000011920929);
|
||||
roughness = 0.0;
|
||||
metallic = 0.0;
|
||||
occlusion = 1.0;
|
||||
emission = 0.0;
|
||||
n /= (abs(n.x) + abs(n.y) + abs(n.z));
|
||||
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
||||
uint matid = 0;
|
||||
if (emission > 0) { basecol *= emission; matid = 1; }
|
||||
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
||||
fragColor[1] = vec4(basecol, occlusion);
|
||||
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
||||
vec2 posb = (prevwvpposition.xy / prevwvpposition.w) * 0.5 + 0.5;
|
||||
fragColor[2].rg = vec2(posa - posb);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#version 450
|
||||
#include "../Libraries/armorbase/Shaders/std/gbuffer.glsl"
|
||||
in vec2 texCoord;
|
||||
in vec3 wnormal;
|
||||
in vec4 wvpposition;
|
||||
in vec4 prevwvpposition;
|
||||
out vec4 fragColor[3];
|
||||
void main() {
|
||||
vec3 n = normalize(wnormal);
|
||||
vec3 basecol;
|
||||
float roughness;
|
||||
float metallic;
|
||||
float occlusion;
|
||||
float emission;
|
||||
float Mix_fac = 0.0;
|
||||
vec3 RGB_Color_res = vec3(0.2176000028848648, 0.2176000028848648, 0.2176000028848648);
|
||||
vec3 Mix_Color_res = RGB_Color_res + texCoord.x * 0.0000001; // keep texCoord
|
||||
basecol = Mix_Color_res;
|
||||
roughness = 0.4000000059604645;
|
||||
metallic = 0.0;
|
||||
occlusion = 1.0;
|
||||
emission = 0.0;
|
||||
n /= (abs(n.x) + abs(n.y) + abs(n.z));
|
||||
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
||||
uint matid = 0;
|
||||
if (emission > 0) { basecol *= emission; matid = 1; }
|
||||
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
||||
fragColor[1] = vec4(basecol, occlusion);
|
||||
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
||||
vec2 posb = (prevwvpposition.xy / prevwvpposition.w) * 0.5 + 0.5;
|
||||
fragColor[2].rg = vec2(posa - posb);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#version 450
|
||||
in vec4 pos;
|
||||
in vec2 nor;
|
||||
in vec2 tex;
|
||||
out vec2 texCoord;
|
||||
out vec3 wnormal;
|
||||
out vec4 wvpposition;
|
||||
out vec4 prevwvpposition;
|
||||
uniform mat3 N;
|
||||
uniform mat4 WVP;
|
||||
uniform float texUnpack;
|
||||
uniform mat4 prevWVP;
|
||||
void main() {
|
||||
vec4 spos = vec4(pos.xyz, 1.0);
|
||||
texCoord = tex * texUnpack;
|
||||
wnormal = normalize(N * vec3(nor.xy, pos.w));
|
||||
gl_Position = WVP * spos;
|
||||
wvpposition = gl_Position;
|
||||
prevwvpposition = prevWVP * spos;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#version 450
|
||||
#include "../Libraries/armorbase/Shaders/std/gbuffer.glsl"
|
||||
in vec3 wnormal;
|
||||
in vec4 wvpposition;
|
||||
in vec4 prevwvpposition;
|
||||
out vec4 fragColor[3];
|
||||
void main() {
|
||||
vec3 n = normalize(wnormal);
|
||||
vec3 basecol;
|
||||
float roughness;
|
||||
float metallic;
|
||||
float occlusion;
|
||||
float emission;
|
||||
basecol = vec3(0.800000011920929, 0.800000011920929, 0.800000011920929);
|
||||
roughness = 0.25;
|
||||
metallic = 0.0;
|
||||
occlusion = 1.0;
|
||||
emission = 0.0;
|
||||
n /= (abs(n.x) + abs(n.y) + abs(n.z));
|
||||
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
||||
uint matid = 0;
|
||||
if (emission > 0) { basecol *= emission; matid = 1; }
|
||||
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
||||
fragColor[1] = vec4(basecol, occlusion);
|
||||
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
||||
vec2 posb = (prevwvpposition.xy / prevwvpposition.w) * 0.5 + 0.5;
|
||||
fragColor[2].rg = vec2(posa - posb);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#version 450
|
||||
in vec4 pos;
|
||||
in vec2 nor;
|
||||
out vec3 wnormal;
|
||||
out vec4 wvpposition;
|
||||
out vec4 prevwvpposition;
|
||||
uniform mat3 N;
|
||||
uniform mat4 WVP;
|
||||
uniform mat4 prevWVP;
|
||||
void main() {
|
||||
vec4 spos = vec4(pos.xyz, 1.0);
|
||||
wnormal = normalize(N * vec3(nor.xy, pos.w));
|
||||
gl_Position = WVP * spos;
|
||||
wvpposition = gl_Position;
|
||||
prevwvpposition = prevWVP * spos;
|
||||
}
|
||||
Reference in New Issue
Block a user