mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-20 07:57:55 +08:00
"fixed" aerochrome on dh chunks...
its pretty far from perfect
This commit is contained in:
parent
85a1b68bf0
commit
d43e821ef2
@ -7,6 +7,7 @@ varying vec2 lightmapCoords;
|
|||||||
varying vec4 normals_and_materials;
|
varying vec4 normals_and_materials;
|
||||||
flat varying float SSSAMOUNT;
|
flat varying float SSSAMOUNT;
|
||||||
flat varying float EMISSIVE;
|
flat varying float EMISSIVE;
|
||||||
|
flat varying int dh_material_id;
|
||||||
|
|
||||||
uniform float far;
|
uniform float far;
|
||||||
// uniform int hideGUI;
|
// uniform int hideGUI;
|
||||||
@ -123,6 +124,22 @@ void main() {
|
|||||||
// Albedo.rgb *= pow(noiseTexture, 0.6 * noiseFactor);
|
// Albedo.rgb *= pow(noiseTexture, 0.6 * noiseFactor);
|
||||||
// Albedo.rgb *= (noiseTexture*noiseTexture)*0.5 + 0.5;
|
// Albedo.rgb *= (noiseTexture*noiseTexture)*0.5 + 0.5;
|
||||||
|
|
||||||
|
#ifdef AEROCHROME_MODE
|
||||||
|
if(dh_material_id == DH_BLOCK_LEAVES || dh_material_id == DH_BLOCK_WATER) { // leaves and waterlogged blocks
|
||||||
|
float grey = dot(Albedo.rgb, vec3(0.2, 01.0, 0.07));
|
||||||
|
Albedo.rgb = mix(vec3(grey), aerochrome_color, 0.7);
|
||||||
|
} else if(dh_material_id == DH_BLOCK_DIRT) { // dirt and grass
|
||||||
|
// separate out green colors as mask
|
||||||
|
float green = saturate(pow(normalize(Albedo.rgb).g, 3.0));
|
||||||
|
// if(Albedo.r > 0.5) green += 0.15;
|
||||||
|
if(Albedo.b > 0.8) green += 0.15;
|
||||||
|
// calculate actual color
|
||||||
|
vec3 red = mix(Albedo.rgb, aerochrome_color, 1.0 - Albedo.g);
|
||||||
|
// apply color only to masked area
|
||||||
|
Albedo.rgb = green > 0.2 ? red : Albedo.rgb;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WhiteWorld
|
#ifdef WhiteWorld
|
||||||
Albedo.rgb = vec3(0.5);
|
Albedo.rgb = vec3(0.5);
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,6 +7,7 @@ varying vec2 lightmapCoords;
|
|||||||
varying vec4 normals_and_materials;
|
varying vec4 normals_and_materials;
|
||||||
flat varying float SSSAMOUNT;
|
flat varying float SSSAMOUNT;
|
||||||
flat varying float EMISSIVE;
|
flat varying float EMISSIVE;
|
||||||
|
flat varying int dh_material_id;
|
||||||
|
|
||||||
uniform vec2 texelSize;
|
uniform vec2 texelSize;
|
||||||
uniform int framemod8;
|
uniform int framemod8;
|
||||||
@ -83,6 +84,7 @@ void main() {
|
|||||||
float MATERIALS = 0.65;
|
float MATERIALS = 0.65;
|
||||||
|
|
||||||
normals_and_materials = vec4(normalize(gl_NormalMatrix * gl_Normal), MATERIALS);
|
normals_and_materials = vec4(normalize(gl_NormalMatrix * gl_Normal), MATERIALS);
|
||||||
|
dh_material_id = dhMaterialId;
|
||||||
|
|
||||||
#if DOF_QUALITY == 5
|
#if DOF_QUALITY == 5
|
||||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||||
|
@ -425,9 +425,8 @@ void main() {
|
|||||||
|
|
||||||
|
|
||||||
#ifdef AEROCHROME_MODE
|
#ifdef AEROCHROME_MODE
|
||||||
vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
|
float gray = dot(Albedo.rgb, vec3(0.2, 1.0, 0.07));
|
||||||
float gray = dot(Albedo.rgb, vec3(0.2, 01.0, 0.07));
|
if(blockID == 10001 || blockID == 10003 || blockID == 10004 || blockID == 10006 || blockID == 10009) {
|
||||||
if(blockID == 10001 || blockID == 10003 || blockID == 10004 || blockID == 10006) {
|
|
||||||
// IR Reflective (Pink-red)
|
// IR Reflective (Pink-red)
|
||||||
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);
|
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);
|
||||||
}
|
}
|
||||||
|
@ -568,6 +568,7 @@ uniform int moonPhase;
|
|||||||
// #define AEROCHROME_MODE // Infra-red film colors ^~^
|
// #define AEROCHROME_MODE // Infra-red film colors ^~^
|
||||||
// #define AEROCHROME_WOOL_ENABLED // Technically wool things should be affected but it affects a lot of builds and stuff
|
// #define AEROCHROME_WOOL_ENABLED // Technically wool things should be affected but it affects a lot of builds and stuff
|
||||||
#define AEROCHROME_PINKNESS 0.3 // How pink it is from red [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
#define AEROCHROME_PINKNESS 0.3 // How pink it is from red [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]
|
||||||
|
const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631), AEROCHROME_PINKNESS);
|
||||||
|
|
||||||
//#define BICUBIC_UPSCALING
|
//#define BICUBIC_UPSCALING
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user