mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
"fixed" aerochrome on dh chunks...
its pretty far from perfect
This commit is contained in:
@ -7,6 +7,7 @@ varying vec2 lightmapCoords;
|
||||
varying vec4 normals_and_materials;
|
||||
flat varying float SSSAMOUNT;
|
||||
flat varying float EMISSIVE;
|
||||
flat varying int dh_material_id;
|
||||
|
||||
uniform float far;
|
||||
// uniform int hideGUI;
|
||||
@ -123,6 +124,22 @@ void main() {
|
||||
// Albedo.rgb *= pow(noiseTexture, 0.6 * noiseFactor);
|
||||
// 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
|
||||
Albedo.rgb = vec3(0.5);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user