Shader cleanup

This commit is contained in:
luboslenco
2023-02-14 14:37:16 +01:00
parent cf5e720d16
commit bd3cf47e47
17 changed files with 12 additions and 58 deletions
@@ -7,23 +7,13 @@ 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;
vec3 basecol = vec3(0.2, 0.2, 0.2) + texCoord.x * 0.0000001; // keep texCoord
float roughness = 0.4;
float metallic = 0.0;
float occlusion = 1.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;
@@ -1,7 +1,6 @@
#version 450
#include "../std/conetrace.glsl"
in vec4 pos;
in vec2 nor;
out vec3 voxpositionGeom;
uniform mat4 W;
void main() {
+3 -3
View File
@@ -1,3 +1,3 @@
..\..\bin\hlslbin.exe armdefault_voxel.vert.hlsl ..\armdefault_voxel.vert.glsl vs_5_0 -i pos
..\..\bin\hlslbin.exe armdefault_voxel.frag.hlsl ..\armdefault_voxel.frag.glsl ps_5_0
..\..\bin\hlslbin.exe armdefault_voxel.geom.hlsl ..\armdefault_voxel.geom.glsl gs_5_0
..\..\bin\hlslbin.exe voxel_pos.vert.hlsl ..\voxel_pos.vert.glsl vs_5_0 -i pos
..\..\bin\hlslbin.exe voxel_pos.frag.hlsl ..\voxel_pos.frag.glsl ps_5_0
..\..\bin\hlslbin.exe voxel_pos.geom.hlsl ..\voxel_pos.geom.glsl gs_5_0