mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
improve fog upsampler and filtered effects upsampler. improve metals in specular reflections. fix end and nether not compiling, and fix SSAO making them black. redo water shader. added water caustics strength misc setting. add 2 new post process types "xonk tonemapp" and "full reinhard". create overdraw prevention for DH shadowmap. fix SSS with dh shadowmap. tweak screenspace shadow SSS to be better in the distance. add fog behind glass. move water fog to be done in the fog behind glass pass.
This commit is contained in:
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite.fsh"
|
||||
#include "/dimensions/fogBehindTranslucent_pass.fsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite.vsh"
|
||||
#include "/dimensions/fogBehindTranslucent_pass.vsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite1.fsh"
|
||||
#include "/dimensions/composite.fsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite1.vsh"
|
||||
#include "/dimensions/composite.vsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite10.fsh"
|
||||
#include "/dimensions/composite9.fsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite10.vsh"
|
||||
#include "/dimensions/composite9.vsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite11.fsh"
|
||||
#include "/dimensions/composite10.fsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite11.vsh"
|
||||
#include "/dimensions/composite10.vsh"
|
5
shaders/world0/composite12.fsh
Normal file
5
shaders/world0/composite12.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite11.fsh"
|
5
shaders/world0/composite12.vsh
Normal file
5
shaders/world0/composite12.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite11.vsh"
|
@ -2,4 +2,4 @@
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/composite2.fsh"
|
||||
#include "/dimensions/composite1.fsh"
|
@ -5,6 +5,9 @@
|
||||
|
||||
flat varying int water;
|
||||
varying vec2 texcoord;
|
||||
|
||||
varying float overdrawCull;
|
||||
|
||||
uniform sampler2D tex;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -13,7 +16,16 @@ uniform sampler2D tex;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
if(water > 0) discard;
|
||||
|
||||
if(water > 0){
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
||||
if(overdrawCull < 1.0){
|
||||
discard;
|
||||
return;
|
||||
}
|
||||
|
||||
gl_FragData[0] = texture2D(tex, texcoord.xy);
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
|
||||
|
||||
|
||||
varying float overdrawCull;
|
||||
// uniform int renderStage;
|
||||
|
||||
void main() {
|
||||
@ -52,7 +53,13 @@ void main() {
|
||||
texcoord.xy = gl_MultiTexCoord0.xy;
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
#ifdef DH_OVERDRAW_PREVENTION
|
||||
vec3 worldpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
overdrawCull = 1.0 - clamp(1.0 - length(worldpos) / max(far-16,0.0),0,1);
|
||||
#else
|
||||
overdrawCull = 1.0;
|
||||
#endif
|
||||
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
gl_Position = BiasShadowProjection(toClipSpace3(position));
|
||||
#else
|
||||
|
@ -170,13 +170,13 @@ void main() {
|
||||
|
||||
#ifdef WAVY_PLANTS
|
||||
bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
|
||||
if ((mc_Entity.x == 10001&&istopv) && length(position.xy) < 24.0) {
|
||||
if ((mc_Entity.x == 10001 || mc_Entity.x == 10009 && istopv) && length(position.xy) < 24.0) {
|
||||
vec3 worldpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
worldpos.xyz += calcMovePlants(worldpos.xyz + cameraPosition)*gl_MultiTexCoord1.y;
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz ;
|
||||
}
|
||||
|
||||
if ((mc_Entity.x == 10003) && length(position.xy) < 24.0) {
|
||||
if (mc_Entity.x == 10003 && length(position.xy) < 24.0) {
|
||||
vec3 worldpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
worldpos.xyz += calcMoveLeaves(worldpos.xyz + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*gl_MultiTexCoord1.y;
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz ;
|
||||
|
Reference in New Issue
Block a user