mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-23 01:02:33 +08:00
Add the whole ass shader
it has begun
This commit is contained in:
37
shaders/world1/texture/composite4.fsh
Normal file
37
shaders/world1/texture/composite4.fsh
Normal file
@ -0,0 +1,37 @@
|
||||
#version 120
|
||||
//Horizontal bilateral blur for volumetric fog + Forward rendered objects + Draw volumetric fog
|
||||
#extension GL_EXT_gpu_shader4 : enable
|
||||
|
||||
|
||||
|
||||
varying vec2 texcoord;
|
||||
flat varying vec3 zMults;
|
||||
uniform sampler2D depthtex0;
|
||||
uniform sampler2D colortex3;
|
||||
uniform sampler2D colortex2;
|
||||
uniform sampler2D colortex0;
|
||||
|
||||
uniform int frameCounter;
|
||||
uniform float far;
|
||||
uniform float near;
|
||||
uniform int isEyeInWater;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
float ld(float depth) {
|
||||
return 1.0 / (zMults.y - depth * zMults.z); // (-depth * (far - near)) = (2.0 * near)/ld - far - near
|
||||
}
|
||||
|
||||
|
||||
void main() {
|
||||
/* DRAWBUFFERS:3 */
|
||||
vec3 color = texture2D(colortex3,texcoord).rgb;
|
||||
vec4 transparencies = texture2D(colortex2,texcoord);
|
||||
color = color*(1.0-transparencies.a)+transparencies.rgb*10.;
|
||||
|
||||
vec4 vl = texture2D(colortex0,texcoord);
|
||||
|
||||
color *= vl.a;
|
||||
color += vl.rgb;
|
||||
|
||||
gl_FragData[0].rgb = clamp(color,6.11*1e-5,65000.0);
|
||||
}
|
19
shaders/world1/texture/composite4.vsh
Normal file
19
shaders/world1/texture/composite4.vsh
Normal file
@ -0,0 +1,19 @@
|
||||
#version 120
|
||||
#extension GL_EXT_gpu_shader4 : enable
|
||||
|
||||
varying vec2 texcoord;
|
||||
flat varying vec3 zMults;
|
||||
uniform float far;
|
||||
uniform float near;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
zMults = vec3((far * near)*2.0,far+near,far-near);
|
||||
gl_Position = ftransform();
|
||||
texcoord = gl_MultiTexCoord0.xy;
|
||||
|
||||
}
|
BIN
shaders/world1/texture/noises.png
Normal file
BIN
shaders/world1/texture/noises.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 679 KiB |
7
shaders/world1/texture/noises.png.mcmeta
Normal file
7
shaders/world1/texture/noises.png.mcmeta
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"texture":
|
||||
{
|
||||
"blur": true,
|
||||
"clamp": false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user