fix speculars and emissives being disabled

This commit is contained in:
Xonk 2024-03-21 23:51:19 -04:00
parent 4bd3510497
commit f22aa95189
3 changed files with 8 additions and 14 deletions

View File

@ -355,8 +355,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
#endif
vec4 COLORTEST = vec4(Albedo, UnchangedAlpha);
#ifdef BIOME_TINT_WATER
if (iswater > 0.95) COLORTEST.rgb = color.rgb;
#endif

View File

@ -1014,7 +1014,6 @@ void main() {
if(shadowMapFalloff > 0.0){
shadowMap = vec3(0.0);
vec3 ShadowColor = vec3(0.0);
vec3 COLOR = vec3(1.0) ;
projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5);
@ -1048,10 +1047,6 @@ void main() {
#endif
}
#ifdef TRANSLUCENT_COLORED_SHADOWS
DirectLightColor = ShadowColor;
#endif
#else
#ifdef TRANSLUCENT_COLORED_SHADOWS
@ -1321,16 +1316,14 @@ void main() {
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * albedo;
// gl_FragData[0].rgb = Direct_lighting;
#ifdef Specular_Reflections
vec2 specularNoises = vec2(noise, R2_dither());
DoSpecularReflections(gl_FragData[0].rgb, viewPos, feetPlayerPos_normalized, WsunVec, specularNoises, normal, SpecularTex.r, SpecularTex.g, albedo, DirectLightColor*Shadows*NdotL, lightmap.y, hand);
#endif
// #ifdef Specular_Reflections
// vec2 specularNoises = vec2(noise, R2_dither());
// DoSpecularReflections(gl_FragData[0].rgb, viewPos, feetPlayerPos_normalized, WsunVec, specularNoises, normal, SpecularTex.r, SpecularTex.g, albedo, DirectLightColor*Shadows*NdotL, lightmap.y, hand);
// #endif
Emission(gl_FragData[0].rgb, albedo, SpecularTex.a);
// Emission(gl_FragData[0].rgb, albedo, SpecularTex.a);
// if(lightningBolt) gl_FragData[0].rgb = vec3(77.0, 153.0, 255.0);
if(lightningBolt) gl_FragData[0].rgb = vec3(77.0, 153.0, 255.0);
}

View File

@ -44,7 +44,6 @@ float blueNoise(){
void main() {
gl_FragData[0] = vec4(1);
gl_FragData[0] = texture2D(tex,texcoord.xy) * color;