Shader Compatibility Example - Low-Drag-MC/Shimmer GitHub Wiki

Attention

All stuff in this article is hacky way, just for people to have a try, and for shader dev a not good but can work example
All the example is just intended for feasible test and is far from perfect

BSL_v8.2.04

License

BSL use ARR License, so even if you modified the source code yourself, don't distribute it

Block/Fluid Bloom

edit file BSL_v8.2.04/shaders/program/gbuffers_terrain.glsl image

if((int(gl_MultiTexCoord1.x) & 0x100) != 0) { mat = 3.0; }

Colored Light

edit file shaders.properties
add the following stuff at the end of that file

iris.features.required = ssbo
bufferObject.0 = 65536
bufferObject.1 = 32
shimmer.config.lights = 0
shimmer.config.env = 1

edit file BSL_v8.2.04/shaders/program/deferred1.glsl

image

#extension GL_ARB_shader_storage_buffer_object : require

image

struct Light {
	vec4 color;
	vec3 position;
	float radius;
};

layout (std140, binding = 0) buffer LightBuffer {
	Light lights[2048];     //  16  8 * 2048
};

layout (std140, binding = 1) buffer EnvBuffer {
	int uvLightCout; //32
	int nouvLightCout;
	vec3 camPos;
};

image

	vec4 cameraBsaedWorldPos = gbufferModelViewInverse * viewPos;
	vec3 actualWorldBase = cameraBsaedWorldPos.xyz + camPos;

	vec3 lightColor = vec3(1.0);
	int lightCount = min(uvLightCout + nouvLightCout, 2048);
	
	for (int i = 0; i< uvLightCout + nouvLightCout ; i++) {
		Light l = lights[i];
		float intensity = smoothstep(0.,1.,1. - distance(l.position,actualWorldBase) / l.radius);
		lightColor += l.color.rgb * l.color.a * intensity * vec3(1.5/*modify this for intensity change*/);
	}
	gl_FragData[0].rgb *= lightColor;

follow the code below, the picture just show a range

Showcase

https://github.com/Low-Drag-MC/Shimmer/assets/26162862/9b74dd79-01c6-4c05-b776-31e779cbd1b8

https://github.com/Low-Drag-MC/Shimmer/assets/26162862/4629bde4-4430-4330-acaf-53b93ed1100f