mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
INTERNAL REWORK. testers are needed.
This commit is contained in:
@ -1,5 +0,0 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite.fsh"
|
@ -1,5 +0,0 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite.vsh"
|
5
shaders/world1/composite10.fsh
Normal file
5
shaders/world1/composite10.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite10.fsh"
|
5
shaders/world1/composite10.vsh
Normal file
5
shaders/world1/composite10.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite10.vsh"
|
5
shaders/world1/composite11.fsh
Normal file
5
shaders/world1/composite11.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite11.fsh"
|
5
shaders/world1/composite11.vsh
Normal file
5
shaders/world1/composite11.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/composite11.vsh"
|
@ -1,25 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#define ENCHANT_GLINT
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
uniform sampler2D texture;
|
||||
|
||||
//faster and actually more precise than pow 2.2
|
||||
vec3 toLinear(vec3 sRGB){
|
||||
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
||||
}
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
/* DRAWBUFFERS:2 */
|
||||
|
||||
void main() {
|
||||
|
||||
gl_FragData[0] = vec4(toLinear( texture2D(texture, lmtexcoord.xy).rgb * color.rgb), 0.1);
|
||||
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.fsh"
|
@ -1,47 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
#define ENCHANT_GLINT
|
||||
|
||||
/*
|
||||
!! DO NOT REMOVE !!
|
||||
This code is from Chocapic13' shaders
|
||||
Read the terms of modification and sharing before changing something below please !
|
||||
!! DO NOT REMOVE !!
|
||||
*/
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-1.,3.)/8.,
|
||||
vec2(5.0,1.)/8.,
|
||||
vec2(-3,-5.)/8.,
|
||||
vec2(-5.,5.)/8.,
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
gl_Position = ftransform();
|
||||
|
||||
lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
|
||||
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy/255.;
|
||||
|
||||
lmtexcoord.zw = lmcoord*lmcoord;
|
||||
|
||||
color = gl_Color;
|
||||
|
||||
#ifdef TAA
|
||||
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
|
||||
#endif
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.vsh"
|
@ -1,29 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#define BEACON_BEAM
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec2 texcoord;
|
||||
varying vec4 color;
|
||||
uniform sampler2D texture;
|
||||
|
||||
//faster and actually more precise than pow 2.2
|
||||
vec3 toLinear(vec3 sRGB){
|
||||
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
||||
}
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
/* DRAWBUFFERS:28 */
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 Albedo = texture2D(texture, texcoord.xy) * color * 1.5;
|
||||
|
||||
gl_FragData[0] = vec4(toLinear(Albedo.rgb), 1.0);
|
||||
gl_FragData[1] = vec4(0.0, 0.0, 0.0, 0.5);
|
||||
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.fsh"
|
@ -1,44 +1,5 @@
|
||||
#version 120
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
#define BEACON_BEAM
|
||||
|
||||
/*
|
||||
!! DO NOT REMOVE !!
|
||||
This code is from Chocapic13' shaders
|
||||
Read the terms of modification and sharing before changing something below please !
|
||||
!! DO NOT REMOVE !!
|
||||
*/
|
||||
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-1.,3.)/8.,
|
||||
vec2(5.0,1.)/8.,
|
||||
vec2(-3,-5.)/8.,
|
||||
vec2(-5.,5.)/8.,
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = ftransform();
|
||||
if(gl_Color.a < 1.0 ) gl_Position = vec4(10,10,10,1);
|
||||
|
||||
texcoord = (gl_MultiTexCoord0).xy;
|
||||
color = gl_Color;
|
||||
|
||||
#ifdef TAA
|
||||
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
|
||||
#endif
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.vsh"
|
@ -1,116 +1,6 @@
|
||||
#version 120
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
|
||||
#define PCF
|
||||
#define END_SHADER
|
||||
#define DAMAGE_BLOCK_EFFECT
|
||||
|
||||
|
||||
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
varying vec4 normalMat;
|
||||
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D gaux1;
|
||||
uniform vec4 lightCol;
|
||||
uniform vec3 sunVec;
|
||||
uniform vec3 upVec;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform float skyIntensityNight;
|
||||
uniform float skyIntensity;
|
||||
uniform float sunElevation;
|
||||
uniform float rainStrength;
|
||||
uniform mat4 gbufferProjectionInverse;
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform mat4 shadowModelView;
|
||||
uniform mat4 shadowProjection;
|
||||
|
||||
//faster and actually more precise than pow 2.2
|
||||
vec3 toLinear(vec3 sRGB){
|
||||
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
||||
}
|
||||
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
|
||||
vec3 toScreenSpace(vec3 p) {
|
||||
vec4 iProjDiag = vec4(gbufferProjectionInverse[0].x, gbufferProjectionInverse[1].y, gbufferProjectionInverse[2].zw);
|
||||
vec3 p3 = p * 2. - 1.;
|
||||
vec4 fragposition = iProjDiag * p3.xyzz + gbufferProjectionInverse[3];
|
||||
return fragposition.xyz / fragposition.w;
|
||||
}
|
||||
float interleaved_gradientNoise(float temporal){
|
||||
vec2 coord = gl_FragCoord.xy;
|
||||
float noise = fract(52.9829189*fract(0.06711056*coord.x + 0.00583715*coord.y)+temporal);
|
||||
return noise;
|
||||
}
|
||||
|
||||
#ifdef PCF
|
||||
const vec2 shadowOffsets[4] = vec2[4](vec2( 0.1250, 0.0000 ),
|
||||
vec2( -0.1768, -0.1768 ),
|
||||
vec2( -0.0000, 0.3750 ),
|
||||
vec2( 0.3536, -0.3536 )
|
||||
);
|
||||
#endif
|
||||
float facos(float sx){
|
||||
float x = clamp(abs( sx ),0.,1.);
|
||||
float a = sqrt( 1. - x ) * ( -0.16882 * x + 1.56734 );
|
||||
return sx > 0. ? a : 3.14159265359 - a;
|
||||
}
|
||||
|
||||
|
||||
vec2 tapLocation(int sampleNumber, float spinAngle,int nb, float nbRot)
|
||||
{
|
||||
float startJitter = (spinAngle/6.28);
|
||||
float alpha = sqrt(sampleNumber + startJitter/nb );
|
||||
float angle = alpha * (nbRot * 6.28) + spinAngle*2.;
|
||||
|
||||
float ssR = alpha;
|
||||
float sin_v, cos_v;
|
||||
|
||||
sin_v = sin(angle);
|
||||
cos_v = cos(angle);
|
||||
|
||||
return vec2(cos_v, sin_v)*ssR;
|
||||
}
|
||||
uniform int framemod8;
|
||||
uniform int framecouter;
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-1.,3.)/8.,
|
||||
vec2(5.0,1.)/8.,
|
||||
vec2(-3,-5.)/8.,
|
||||
vec2(-5.,5.)/8.,
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
/* DRAWBUFFERS:2 */
|
||||
void main() {
|
||||
|
||||
gl_FragData[0] = texture2D(texture, lmtexcoord.xy)*color;
|
||||
vec2 tempOffset=offsets[framemod8];
|
||||
|
||||
if (gl_FragData[0].a>0.1){
|
||||
vec3 albedo = toLinear(gl_FragData[0].rgb);
|
||||
|
||||
vec3 normal = normalMat.xyz;
|
||||
|
||||
|
||||
vec3 ambient = texture2D(gaux1,(lmtexcoord.zw*15.+0.5)*texelSize).rgb;
|
||||
|
||||
vec3 diffuseLight = ambient;
|
||||
|
||||
|
||||
gl_FragData[0].rgb = diffuseLight*albedo*8./1500.*0.1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
#include "/dimensions/all_translucent.fsh"
|
@ -1,54 +1,6 @@
|
||||
#version 120
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
#define TAA
|
||||
|
||||
/*
|
||||
!! DO NOT REMOVE !!
|
||||
This code is from Chocapic13' shaders
|
||||
Read the terms of modification and sharing before changing something below please !
|
||||
!! DO NOT REMOVE !!
|
||||
*/
|
||||
#define END_SHADER
|
||||
#define DAMAGE_BLOCK_EFFECT
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
varying vec4 normalMat;
|
||||
#ifdef MC_NORMAL_MAP
|
||||
varying vec4 tangent;
|
||||
attribute vec4 at_tangent;
|
||||
#endif
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-1.,3.)/8.,
|
||||
vec2(5.0,1.)/8.,
|
||||
vec2(-3,-5.)/8.,
|
||||
vec2(-5.,5.)/8.,
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
lmtexcoord.xy = (gl_MultiTexCoord0).xy;
|
||||
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy/255.;
|
||||
lmtexcoord.zw = lmcoord;
|
||||
|
||||
gl_Position = ftransform();
|
||||
color = gl_Color;
|
||||
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
|
||||
#endif
|
||||
|
||||
normalMat = vec4(normalize(gl_NormalMatrix *gl_Normal),1.0);
|
||||
#ifdef TAA
|
||||
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
|
||||
#endif
|
||||
}
|
||||
#include "/dimensions/all_translucent.vsh"
|
5
shaders/world1/gbuffers_entities_glowing.fsh
Normal file
5
shaders/world1/gbuffers_entities_glowing.fsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define GLOWING
|
||||
|
||||
#include "/dimensions/all_vanilla_emissives.fsh"
|
5
shaders/world1/gbuffers_entities_glowing.vsh
Normal file
5
shaders/world1/gbuffers_entities_glowing.vsh
Normal file
@ -0,0 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#define GLOWING
|
||||
|
||||
#include "/dimensions/all_vanilla_emissives.vsh"
|
@ -1,5 +1,6 @@
|
||||
#version 120
|
||||
|
||||
#define HAND
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/all_translucent.fsh"
|
@ -1,5 +1,6 @@
|
||||
#version 120
|
||||
|
||||
#define HAND
|
||||
#define END_SHADER
|
||||
|
||||
#include "/dimensions/all_translucent.vsh"
|
@ -1,29 +1,5 @@
|
||||
#version 120
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#define SPIDER_EYES
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec2 texcoord;
|
||||
varying vec4 color;
|
||||
uniform sampler2D texture;
|
||||
|
||||
//faster and actually more precise than pow 2.2
|
||||
vec3 toLinear(vec3 sRGB){
|
||||
return sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);
|
||||
}
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
/* DRAWBUFFERS:28 */
|
||||
|
||||
void main() {
|
||||
|
||||
vec4 Albedo = texture2D(texture, texcoord.xy) * color;
|
||||
|
||||
gl_FragData[0] = vec4(toLinear(Albedo.rgb), Albedo.a);
|
||||
gl_FragData[1] = vec4(0.0, 0.0, 0.0, 0.5);
|
||||
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.fsh"
|
@ -1,43 +1,5 @@
|
||||
#version 120
|
||||
//#extension GL_EXT_gpu_shader4 : disable
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#include "/lib/res_params.glsl"
|
||||
#define SPIDER_EYES
|
||||
|
||||
/*
|
||||
!! DO NOT REMOVE !!
|
||||
This code is from Chocapic13' shaders
|
||||
Read the terms of modification and sharing before changing something below please !
|
||||
!! DO NOT REMOVE !!
|
||||
*/
|
||||
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord;
|
||||
|
||||
uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
vec2(-1.,3.)/8.,
|
||||
vec2(5.0,1.)/8.,
|
||||
vec2(-3,-5.)/8.,
|
||||
vec2(-5.,5.)/8.,
|
||||
vec2(-7.,-1.)/8.,
|
||||
vec2(3,7.)/8.,
|
||||
vec2(7.,-7.)/8.);
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = ftransform();
|
||||
|
||||
texcoord = (gl_MultiTexCoord0).xy;
|
||||
color = gl_Color;
|
||||
|
||||
#ifdef TAA
|
||||
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
|
||||
#endif
|
||||
}
|
||||
#include "/dimensions/all_vanilla_emissives.vsh"
|
Reference in New Issue
Block a user