Fix invalid swizzling mistake.

This commit is contained in:
Xonk 2023-10-08 15:16:13 -04:00
parent 32be3c4847
commit feeaec78ae
8 changed files with 8 additions and 16 deletions

View File

@ -1,4 +1,3 @@
#extension GL_EXT_gpu_shader4 : enable
#extension GL_ARB_shader_texture_lod : enable
#include "/lib/settings.glsl"
@ -464,11 +463,11 @@ void main() {
//////////////////////////////// ////////////////////////////////
#if defined WORLD && defined MC_NORMAL_MAP
vec3 NormalTex = texture2D_POMSwitch(normals, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM).xya;
vec3 NormalTex = texture2D_POMSwitch(normals, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM).xyw;
float Heightmap = 1.0 - NormalTex.z;
NormalTex.xy = NormalTex.xy*2.0-1.0;
NormalTex.z = clamp(sqrt(1.0 - dot(NormalTex.xy, NormalTex.xy)),0.0,1.0) ;
NormalTex.xy = NormalTex.xy * 2.0-1.0;
NormalTex.z = sqrt(max(1.0 - dot(NormalTex.xy, NormalTex.xy), 0.0));
#if defined HEIGTHMAP_DEPTH_OFFSET && !defined HAND
gl_FragDepth = gl_FragCoord.z;

View File

@ -1,4 +1,4 @@
#extension GL_EXT_gpu_shader4 : enable
#include "/lib/settings.glsl"
#include "/lib/res_params.glsl"
#include "/lib/bokeh.glsl"

View File

@ -1,6 +1,3 @@
//#extension GL_EXT_gpu_shader4 : disable
#include "/lib/settings.glsl"
flat varying vec2 TAA_Offset;

View File

@ -2,7 +2,7 @@
#include "/lib/res_params.glsl"
#include "/lib/Shadow_Params.glsl"
// #extension GL_EXT_gpu_shader4 : enable
flat varying vec3 averageSkyCol_Clouds;
flat varying vec3 averageSkyCol;

View File

@ -1,5 +1,3 @@
//#extension GL_EXT_gpu_shader4 : disable
#include "/lib/settings.glsl"
//Computes volumetric clouds at variable resolution (default 1/4 res)

View File

@ -1,5 +1,3 @@
//#extension GL_EXT_gpu_shader4 : disable
#include "/lib/settings.glsl"
flat varying vec3 averageSkyCol;

View File

@ -1,6 +1,6 @@
#version 120
//#extension GL_ARB_shader_texture_lod : disable
#extension GL_EXT_gpu_shader4 : enable
#include "/lib/settings.glsl"
@ -22,7 +22,7 @@ void main() {
gl_FragData[0] = texture2D(tex,texcoord.xy);
#ifdef SHADOW_DISABLE_ALPHA_MIPMAPS
gl_FragData[0].a = texture2DLod(tex,texcoord.xy,0).a;
gl_FragData[0].a = texture2DLod(tex,texcoord.xy, 0).a;
#endif
#ifdef RENDER_ENTITY_SHADOWS

View File

@ -1,5 +1,5 @@
#version 120
#extension GL_EXT_gpu_shader4 : enable
/*