mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2026-10-10 05:03:04 +08:00
small code cleanups for voxy support
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
",
|
||||
"version": 1,
|
||||
"excludeLodsFromVanillaDepth": true,
|
||||
"uniforms": [],
|
||||
"samplers": {},
|
||||
"opaqueDrawBuffers": [1,8,15],
|
||||
"translucentDrawBuffers": [2,7],
|
||||
"blending": {
|
||||
@@ -47,7 +45,10 @@
|
||||
"isEyeInWater",
|
||||
"near",
|
||||
"far",
|
||||
"taaJitter"
|
||||
"taaJitter",
|
||||
"LOD_NEARPLANE",
|
||||
"LOD_FARPLANE",
|
||||
"LOD_RENDERDISTANCE"
|
||||
]
|
||||
#if TAA_MODE > 0
|
||||
,"taaOffset": "{
|
||||
|
||||
@@ -49,10 +49,10 @@ layout(location = 2) out vec4 MISC_DATA;
|
||||
void voxy_emitFragment(VoxyFragmentParameters parameters) {
|
||||
|
||||
vec3 normal = vec3( uint((parameters.face >> 1) == 2), uint((parameters.face >> 1) == 0), uint((parameters.face >> 1) == 1) ) * (float(int(parameters.face) & 1) * 2.0 - 1.0);
|
||||
normal.z = clamp(normal.z-1.0,-1,1)*0.5+0.5;
|
||||
normal.z = clamp(normal.z-1.0,-1.0,1.0)*0.5+0.5;
|
||||
normal = normalize(normal);
|
||||
|
||||
vec3 Albedo = clamp( parameters.sampledColour.rgb * parameters.tinting.rgb, 0.0, 1.0);
|
||||
vec3 Albedo = parameters.sampledColour.rgb * parameters.tinting.rgb;
|
||||
|
||||
#ifdef WhiteWorld
|
||||
Albedo.rgb = vec3(1.0);
|
||||
|
||||
@@ -44,11 +44,6 @@ vec3 WsunVec = normalize((float(sunElevation > 1e-5)*2.0 - 1.0) * normalize(mat3
|
||||
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
|
||||
#define PI 3.141592653589793
|
||||
|
||||
uniform float LOD_NEARPLANE;
|
||||
uniform float LOD_FARPLANE;
|
||||
uniform int LOD_RENDERDISTANCE;
|
||||
|
||||
|
||||
float DH_ld(float dist) {
|
||||
return (2.0 * LOD_NEARPLANE) / (LOD_FARPLANE + LOD_NEARPLANE - dist * (LOD_FARPLANE - LOD_NEARPLANE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user