Shader cleanup
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,28 +0,0 @@
|
|||||||
#version 450
|
|
||||||
#include "../../base/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);
|
|
||||||
}
|
|
||||||
+5
-12
@@ -5,21 +5,14 @@ in vec4 wvpposition;
|
|||||||
in vec4 prevwvpposition;
|
in vec4 prevwvpposition;
|
||||||
out vec4 fragColor[3];
|
out vec4 fragColor[3];
|
||||||
void main() {
|
void main() {
|
||||||
vec3 n = normalize(wnormal);
|
vec3 n = normalize(wnormal);
|
||||||
vec3 basecol;
|
vec3 basecol = vec3(0.8, 0.8, 0.8);
|
||||||
float roughness;
|
float roughness = 0.25;
|
||||||
float metallic;
|
float metallic = 0.0;
|
||||||
float occlusion;
|
float occlusion = 1.0;
|
||||||
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 /= (abs(n.x) + abs(n.y) + abs(n.z));
|
||||||
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
||||||
uint matid = 0;
|
uint matid = 0;
|
||||||
if (emission > 0) { basecol *= emission; matid = 1; }
|
|
||||||
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
||||||
fragColor[1] = vec4(basecol, occlusion);
|
fragColor[1] = vec4(basecol, occlusion);
|
||||||
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
||||||
+4
-14
@@ -7,23 +7,13 @@ in vec4 prevwvpposition;
|
|||||||
out vec4 fragColor[3];
|
out vec4 fragColor[3];
|
||||||
void main() {
|
void main() {
|
||||||
vec3 n = normalize(wnormal);
|
vec3 n = normalize(wnormal);
|
||||||
vec3 basecol;
|
vec3 basecol = vec3(0.2, 0.2, 0.2) + texCoord.x * 0.0000001; // keep texCoord
|
||||||
float roughness;
|
float roughness = 0.4;
|
||||||
float metallic;
|
float metallic = 0.0;
|
||||||
float occlusion;
|
float occlusion = 1.0;
|
||||||
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 /= (abs(n.x) + abs(n.y) + abs(n.z));
|
||||||
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
n.xy = n.z >= 0.0 ? n.xy : octahedronWrap(n.xy);
|
||||||
uint matid = 0;
|
uint matid = 0;
|
||||||
if (emission > 0) { basecol *= emission; matid = 1; }
|
|
||||||
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
fragColor[0] = vec4(n.xy, roughness, packFloatInt16(metallic, matid));
|
||||||
fragColor[1] = vec4(basecol, occlusion);
|
fragColor[1] = vec4(basecol, occlusion);
|
||||||
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
vec2 posa = (wvpposition.xy / wvpposition.w) * 0.5 + 0.5;
|
||||||
-1
@@ -1,7 +1,6 @@
|
|||||||
#version 450
|
#version 450
|
||||||
#include "../std/conetrace.glsl"
|
#include "../std/conetrace.glsl"
|
||||||
in vec4 pos;
|
in vec4 pos;
|
||||||
in vec2 nor;
|
|
||||||
out vec3 voxpositionGeom;
|
out vec3 voxpositionGeom;
|
||||||
uniform mat4 W;
|
uniform mat4 W;
|
||||||
void main() {
|
void main() {
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
..\..\bin\hlslbin.exe armdefault_voxel.vert.hlsl ..\armdefault_voxel.vert.glsl vs_5_0 -i pos
|
..\..\bin\hlslbin.exe voxel_pos.vert.hlsl ..\voxel_pos.vert.glsl vs_5_0 -i pos
|
||||||
..\..\bin\hlslbin.exe armdefault_voxel.frag.hlsl ..\armdefault_voxel.frag.glsl ps_5_0
|
..\..\bin\hlslbin.exe voxel_pos.frag.hlsl ..\voxel_pos.frag.glsl ps_5_0
|
||||||
..\..\bin\hlslbin.exe armdefault_voxel.geom.hlsl ..\armdefault_voxel.geom.glsl gs_5_0
|
..\..\bin\hlslbin.exe voxel_pos.geom.hlsl ..\voxel_pos.geom.glsl gs_5_0
|
||||||
|
|||||||
Reference in New Issue
Block a user