diff --git a/shaders/dimensions/DH_translucent.fsh b/shaders/dimensions/DH_translucent.fsh index aa34c0a..62329df 100644 --- a/shaders/dimensions/DH_translucent.fsh +++ b/shaders/dimensions/DH_translucent.fsh @@ -300,6 +300,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) gl_FragData[0] = gcolor; // float UnchangedAlpha = gl_FragData[0].a; + #if DEBUG_VIEW == debug_ALBEDO + vec4 unalteredAlbedo = vec4(toLinear(gl_FragData[0].rgb),gl_FragData[0].a); + #endif + #ifdef WhiteWorld gl_FragData[0].rgb = vec3(1.0); gl_FragData[0].a = 1.0; @@ -441,17 +445,26 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) if(texture(depthtex0, gl_FragCoord.xy*texelSize).x < 1.0 || distancefade > 0.0){ gl_FragData[0].a = 0.0; material = 0.0; + #if DEBUG_VIEW == debug_ALBEDO + unalteredAlbedo.a = 0.0; + #endif } #else if(texture(depthtex0, gl_FragCoord.xy*texelSize).x < 1.0){ gl_FragData[0].a = 0.0; material = 0.0; + #if DEBUG_VIEW == debug_ALBEDO + unalteredAlbedo.a = 0.0; + #endif } #endif #if DEBUG_VIEW == debug_DH_WATER_BLENDING if(gl_FragCoord.x*texelSize.x > 0.53) gl_FragData[0] = vec4(0.0); #endif + #if DEBUG_VIEW == debug_ALBEDO + gl_FragData[0] = unalteredAlbedo; + #endif // #if DEBUG_VIEW == debug_MATERIAL_SSS // Albedo.rgb = vec3(0.1); // if(SSSAMOUNT > 0.0) Albedo.rgb = vec3(0.0,SSSAMOUNT,0.0); diff --git a/shaders/dimensions/all_particles.fsh b/shaders/dimensions/all_particles.fsh index abc2a35..886aa81 100644 --- a/shaders/dimensions/all_particles.fsh +++ b/shaders/dimensions/all_particles.fsh @@ -394,6 +394,9 @@ float luma(vec3 color) { Albedo.rgb = toLinear(Albedo.rgb); + #if DEBUG_VIEW == debug_ALBEDO + vec4 unalteredAlbedo = Albedo; + #endif // if(dot(Albedo.rgb, vec3(0.33333)) < 1.0/255.0) { discard; return; } // if(Albedo.a < 0.01 ) { discard; return; } @@ -425,6 +428,10 @@ float luma(vec3 color) { vec3 Albedo = toLinear(TEXTURE.rgb); + #if DEBUG_VIEW == debug_ALBEDO + vec4 unalteredAlbedo = vec4(Albedo,TEXTURE.a); + #endif + vec2 lightmap = clamp(lmtexcoord.zw,0.0,1.0); #if MC_VERSION < 12109 @@ -554,7 +561,9 @@ float luma(vec3 color) { #if DEBUG_VIEW == debug_LIGHTMAPS gl_FragData[0].rgb = vec3(lmtexcoord.z,lmtexcoord.w,0.0)*0.1; #endif - + #if DEBUG_VIEW == debug_ALBEDO + gl_FragData[0] = unalteredAlbedo; + #endif gl_FragData[0].rgb *= 0.1; #endif #endif diff --git a/shaders/dimensions/all_translucent.fsh b/shaders/dimensions/all_translucent.fsh index d4e929f..203f0e2 100644 --- a/shaders/dimensions/all_translucent.fsh +++ b/shaders/dimensions/all_translucent.fsh @@ -456,6 +456,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) gl_FragData[0] = texture(texture, lmtexcoord.xy, mipmapBias) * color; #endif + #if DEBUG_VIEW == debug_ALBEDO + vec4 unalteredAlbedo = vec4(toLinear(gl_FragData[0].rgb),gl_FragData[0].a); + #endif + float UnchangedAlpha = gl_FragData[0].a; #ifdef WhiteWorld @@ -822,6 +826,9 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) #if DEBUG_VIEW == debug_DH_WATER_BLENDING if(gl_FragCoord.x*texelSize.x < 0.47) gl_FragData[0] = vec4(0.0); #endif + #if DEBUG_VIEW == debug_ALBEDO + gl_FragData[0] = unalteredAlbedo; + #endif #if DEBUG_VIEW == debug_NORMALS gl_FragData[0].rgb = worldSpaceNormal.xyz * 0.1; gl_FragData[0].a = 1; diff --git a/shaders/dimensions/composite1.fsh b/shaders/dimensions/composite1.fsh index 50638bf..1045fb3 100644 --- a/shaders/dimensions/composite1.fsh +++ b/shaders/dimensions/composite1.fsh @@ -1481,6 +1481,9 @@ void main() { if(dot(feetPlayerPos_normalized, unsigned_WsunVec) > 0.999 ) gl_FragData[0].rgb = vec3(10,10,0); if(dot(feetPlayerPos_normalized, -WmoonVec) > 0.999 ) gl_FragData[0].rgb = vec3(1,1,10); #endif + #if DEBUG_VIEW == debug_ALBEDO + gl_FragData[0].rgb = albedo; + #endif #if DEBUG_VIEW == debug_NORMALS if(swappedDepth >= 1.0) Direct_lighting = vec3(1.0); gl_FragData[0].rgb = (hideGUI == 1 ? normal : -normal);// * vec3(0,1,0); diff --git a/shaders/dimensions/voxy_translucent.glsl b/shaders/dimensions/voxy_translucent.glsl index ed03b0c..da10c27 100644 --- a/shaders/dimensions/voxy_translucent.glsl +++ b/shaders/dimensions/voxy_translucent.glsl @@ -228,6 +228,10 @@ void voxy_emitFragment(VoxyFragmentParameters parameters) { // colors vec4 Albedo = parameters.sampledColour * parameters.tinting; + #if DEBUG_VIEW == debug_ALBEDO + vec4 unalteredAlbedo = Albedo; + #endif + if(isWater) { Albedo = vec4(0.0); FORWARD_RENDERED_COLOR.a = 0.0; @@ -319,4 +323,8 @@ void voxy_emitFragment(VoxyFragmentParameters parameters) { FORWARD_RENDERED_COLOR.rgb = normal.xyz * 0.1; FORWARD_RENDERED_COLOR.a = 1.0; #endif + + #if DEBUG_VIEW == debug_ALBEDO + FORWARD_RENDERED_COLOR.rgba = unalteredAlbedo; + #endif } \ No newline at end of file diff --git a/shaders/lib/settings.glsl b/shaders/lib/settings.glsl index 8b02f23..24834ff 100644 --- a/shaders/lib/settings.glsl +++ b/shaders/lib/settings.glsl @@ -805,22 +805,23 @@ #define INTEL_HANDHELDLIGHT_CRASH_FIX #define debug_OFF 0 #define debug_SHADOWMAP 1 -#define debug_NORMALS 2 -#define debug_SPECULAR 3 -#define debug_INDIRECT 4 -#define debug_DIRECT 5 -#define debug_VIEW_POSITION 6 -#define debug_DH_WATER_BLENDING 7 -#define debug_FILTERED_STUFF 8 -#define debug_DEPTHTEX0 9 -#define debug_DEPTHTEX1 10 -#define debug_MATERIAL_SSS 11 -#define debug_MATERIAL_EMISSION 12 -#define debug_LIGHTMAPS 13 -#define debug_FORWARD_RENDERING 14 -#define debug_FORWARD_COLOR_TINT 15 -#define debug_DEFERRED_RENDERING 16 -#define DEBUG_VIEW debug_OFF // [debug_OFF debug_SHADOWMAP debug_NORMALS debug_SPECULAR debug_INDIRECT debug_DIRECT debug_VIEW_POSITION debug_DH_WATER_BLENDING debug_FILTERED_STUFF debug_DEPTHTEX0 debug_DEPTHTEX1 debug_MATERIAL_SSS debug_MATERIAL_EMISSION debug_LIGHTMAPS debug_FORWARD_RENDERING debug_FORWARD_COLOR_TINT debug_DEFERRED_RENDERING] +#define debug_ALBEDO 2 +#define debug_NORMALS 3 +#define debug_SPECULAR 4 +#define debug_INDIRECT 5 +#define debug_DIRECT 6 +#define debug_VIEW_POSITION 7 +#define debug_DH_WATER_BLENDING 8 +#define debug_FILTERED_STUFF 9 +#define debug_DEPTHTEX0 10 +#define debug_DEPTHTEX1 11 +#define debug_MATERIAL_SSS 12 +#define debug_MATERIAL_EMISSION 13 +#define debug_LIGHTMAPS 14 +#define debug_FORWARD_RENDERING 15 +#define debug_FORWARD_COLOR_TINT 16 +#define debug_DEFERRED_RENDERING 17 +#define DEBUG_VIEW debug_OFF // [debug_OFF debug_SHADOWMAP debug_ALBEDO debug_NORMALS debug_SPECULAR debug_INDIRECT debug_DIRECT debug_VIEW_POSITION debug_DH_WATER_BLENDING debug_FILTERED_STUFF debug_DEPTHTEX0 debug_DEPTHTEX1 debug_MATERIAL_SSS debug_MATERIAL_EMISSION debug_LIGHTMAPS debug_FORWARD_RENDERING debug_FORWARD_COLOR_TINT debug_DEFERRED_RENDERING] // #define THE_ORB #ifdef THE_ORB