Post your screenshots!

Dead monkey 404
Member
Posts: 24
Joined: Tue Apr 13, 2021 11:05
In-game: Deadmonkey404

Re: Post your screenshots!

by Dead monkey 404 » Post

Just love the shader
Attachments
screenshot_20230215_115731.png
screenshot_20230215_115731.png (965.58 KiB) Viewed 3699 times
Look through a black mirror, darkly... and see your sins unveiled.

User avatar
apercy
Member
Posts: 640
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: Post your screenshots!

by apercy » Post

airship.jpeg
airship.jpeg (83.07 KiB) Viewed 3574 times

User avatar
apercy
Member
Posts: 640
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: Post your screenshots!

by apercy » Post

screenshot_20230225_224856.jpg
screenshot_20230225_224856.jpg (82.18 KiB) Viewed 3507 times

User avatar
apercy
Member
Posts: 640
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: Post your screenshots!

by apercy » Post

screenshot_20230225_225703.jpg
screenshot_20230225_225703.jpg (43.66 KiB) Viewed 3507 times

User avatar
Wuzzy
Member
Posts: 4788
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Post your screenshots!

by Wuzzy » Post

What reworking the sound effects in Repixture looks like:

Image

(I built this to test node sounds more efficiently and mark my progress. Rows with purple block at top = done)

blocker
Member
Posts: 42
Joined: Fri Jan 08, 2021 06:14
Location: Germany

Re: Post your screenshots!

by blocker » Post


User avatar
Wuzzy
Member
Posts: 4788
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Post your screenshots!

by Wuzzy » Post

Retro Plus texture pack version 10 is using a similar desert sand color as in Minetest-c55 0.4: Image

More retro style:
Image

User avatar
vintprox
New member
Posts: 5
Joined: Wed Mar 01, 2023 09:18
GitHub: vintprox
In-game: vintprox
Contact:

Re: Post your screenshots!

by vintprox » Post

🤣 Few minutes on CTF server until anarchy unfolded.

Image

On another news, whoever it is, their nickname and skull icon perfectly represent gen Z humor.

Image

redtiger
New member
Posts: 1
Joined: Thu Mar 02, 2023 14:22
GitHub: suahib68
In-game: suhaib

help me

by redtiger » Post

how can i make a post or topic
cdb_b8bc214e2340

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Post your screenshots!

by Blockhead » Post

The signs are there for a reason :)
screenshot_20230303_045318.png
screenshot_20230303_045318.png (956.46 KiB) Viewed 3231 times
Mod: aussiesigns
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Horka
Member
Posts: 166
Joined: Sat Aug 13, 2022 17:38
GitHub: Clemstriangular
In-game: Horka
Location: France

Re: Post your screenshots!

by Horka » Post

I need your opinion for my texture pack.
What do you think? Thanks!
Try it. :)
Image
Image
For more on content DB (there is a video): https://content.minetest.net/packages/C ... es_1024px/

User avatar
Mr. Rar
Member
Posts: 109
Joined: Tue Oct 04, 2016 20:13
GitHub: MrRar
In-game: MrRar

Re: Post your screenshots!

by Mr. Rar » Post

Horka wrote:
Thu Mar 02, 2023 18:25
I need your opinion for my texture pack.
What do you think? Thanks!
The grass texture looks very nice.

Some other things could use some improvement in my opinion.

The aspen trunks don't look realistic. I've never seen an aspen tree with dark patches that run straight up the tree. Aspen trees have dark patches that are smaller and are often shaped like eyes.

The cut face of wood could also use some work. The edge of the bark looks very fake. It's too soft and the bark doesn't look real.

The shading on stone blocks is too perfect and looks fake.

The transition between dirt and grass on dirt with grass is too sharp.
"Only in Christ do we find real love, and the fullness of life. And so I invite you today to look to Christ." - St. John Paul II

User avatar
Horka
Member
Posts: 166
Joined: Sat Aug 13, 2022 17:38
GitHub: Clemstriangular
In-game: Horka
Location: France

Re: Post your screenshots!

by Horka » Post

Mr. Rar wrote:
Thu Mar 02, 2023 21:01
Horka wrote:
Thu Mar 02, 2023 18:25
I need your opinion for my texture pack.
What do you think? Thanks!
The grass texture looks very nice.

Some other things could use some improvement in my opinion.

The aspen trunks don't look realistic. I've never seen an aspen tree with dark patches that run straight up the tree. Aspen trees have dark patches that are smaller and are often shaped like eyes.

The cut face of wood could also use some work. The edge of the bark looks very fake. It's too soft and the bark doesn't look real.

The shading on stone blocks is too perfect and looks fake.

The transition between dirt and grass on dirt with grass is too sharp.
Ok, thank you very much for your clear opinion. This is very useful for me because I see the textures all the time so I don't necessarily notice these small details. Which nevertheless make a difference, the proof...
So I will try to improve all this.
But for the block of stone I don't see how I could do it.
Thank you very much for your answer

User avatar
Horka
Member
Posts: 166
Joined: Sat Aug 13, 2022 17:38
GitHub: Clemstriangular
In-game: Horka
Location: France

Re: Post your screenshots!

by Horka » Post

apercy wrote:
Sun Jan 08, 2023 21:14
Shadows improved

screenshot_20230108_181212.png

Code: Select all

uniform sampler2D baseTexture;

uniform vec3 dayLight;
uniform vec4 skyBgColor;
uniform float fogDistance;
uniform vec3 eyePosition;

// The cameraOffset is the current center of the visible world.
uniform vec3 cameraOffset;
uniform float animationTimer;
#ifdef ENABLE_DYNAMIC_SHADOWS
	// shadow texture
	uniform sampler2D ShadowMapSampler;
	// shadow uniforms
	uniform vec3 v_LightDirection;
	uniform float f_textureresolution;
	uniform mat4 m_ShadowViewProj;
	uniform float f_shadowfar;
	uniform float f_shadow_strength;
	uniform vec4 CameraPos;
	uniform float xyPerspectiveBias0;
	uniform float xyPerspectiveBias1;
	
	varying float adj_shadow_strength;
	varying float cosLight;
	varying float f_normal_length;
	varying vec3 shadow_position;
	varying float perspective_factor;
#endif


varying vec3 vNormal;
varying vec3 vPosition;
// World position in the visible world (i.e. relative to the cameraOffset.)
// This can be used for many shader effects without loss of precision.
// If the absolute position is required it can be calculated with
// cameraOffset + worldPosition (for large coordinates the limits of float
// precision must be considered).
varying vec3 worldPosition;
varying lowp vec4 varColor;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
varying vec3 eyeVec;
varying float nightRatio;
varying vec3 tsEyeVec;
varying vec3 lightVec;
varying vec3 tsLightVec;

const float fogStart = FOG_START;
const float fogShadingParameter = 1.0 / ( 1.0 - fogStart);

#ifdef ENABLE_DYNAMIC_SHADOWS

// assuming near is always 1.0
float getLinearDepth()
{
	return 2.0 * f_shadowfar / (f_shadowfar + 1.0 - (2.0 * gl_FragCoord.z - 1.0) * (f_shadowfar - 1.0));
}

vec3 getLightSpacePosition()
{
	return shadow_position * 0.5 + 0.5;
}
// custom smoothstep implementation because it's not defined in glsl1.2
// https://docs.gl/sl4/smoothstep
float mtsmoothstep(in float edge0, in float edge1, in float x)
{
	float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
	return t * t * (3.0 - 2.0 * t);
}

#ifdef COLORED_SHADOWS

// c_precision of 128 fits within 7 base-10 digits
const float c_precision = 128.0;
const float c_precisionp1 = c_precision + 1.0;

float packColor(vec3 color)
{
	return floor(color.b * c_precision + 0.5)
		+ floor(color.g * c_precision + 0.5) * c_precisionp1
		+ floor(color.r * c_precision + 0.5) * c_precisionp1 * c_precisionp1;
}

vec3 unpackColor(float value)
{
	vec3 color;
	color.b = mod(value, c_precisionp1) / c_precision;
	color.g = mod(floor(value / c_precisionp1), c_precisionp1) / c_precision;
	color.r = floor(value / (c_precisionp1 * c_precisionp1)) / c_precision;
	return color;
}

vec4 getHardShadowColor(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	vec4 texDepth = texture2D(shadowsampler, smTexCoord.xy).rgba;

	float visibility = step(0.0, realDistance - texDepth.r);
	vec4 result = vec4(visibility, vec3(0.0,0.0,0.0));//unpackColor(texDepth.g));
	if (visibility < 0.1) {
		visibility = step(0.0, realDistance - texDepth.b);
		result = vec4(visibility, unpackColor(texDepth.a));
	}
	return result;
}

#else

float getHardShadow(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float texDepth = texture2D(shadowsampler, smTexCoord.xy).r;
	float visibility = step(0.0, realDistance - texDepth);
	return visibility;
}

#endif


#if SHADOW_FILTER == 2
	#define PCFBOUND 2.0 // 5x5
	#define PCFSAMPLES 25
#elif SHADOW_FILTER == 1
	#define PCFBOUND 1.0 // 3x3
	#define PCFSAMPLES 9
#else
	#define PCFBOUND 0.0
	#define PCFSAMPLES 1
#endif

#ifdef COLORED_SHADOWS
float getHardShadowDepth(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	vec4 texDepth = texture2D(shadowsampler, smTexCoord.xy);
	float depth = max(realDistance - texDepth.r, realDistance - texDepth.b);
	return depth;
}
#else
float getHardShadowDepth(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float texDepth = texture2D(shadowsampler, smTexCoord.xy).r;
	float depth = realDistance - texDepth;
	return depth;
}
#endif

#define BASEFILTERRADIUS 1.0

float getPenumbraRadius(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	// Return fast if sharp shadows are requested
	if (PCFBOUND == 0.0 || SOFTSHADOWRADIUS <= 0.0)
		return 0.0;

	vec2 clampedpos;
	float y, x;
	float depth = getHardShadowDepth(shadowsampler, smTexCoord.xy, realDistance);
	// A factor from 0 to 1 to reduce blurring of short shadows
	float sharpness_factor = 1.0;
	// conversion factor from shadow depth to blur radius
	float depth_to_blur = f_shadowfar / SOFTSHADOWRADIUS / xyPerspectiveBias0;
	if (depth > 0.0 && f_normal_length > 0.0)
		// 5 is empirical factor that controls how fast shadow loses sharpness
		sharpness_factor = clamp(5 * depth * depth_to_blur, 0.0, 1.0);
	depth = 0.0;

	float world_to_texture = xyPerspectiveBias1 / perspective_factor / perspective_factor
			* f_textureresolution / 2.0 / f_shadowfar;
	float world_radius = 0.2; // shadow blur radius in world float coordinates, e.g. 0.2 = 0.02 of one node

	return max(BASEFILTERRADIUS * f_textureresolution / 4096.0,  sharpness_factor * world_radius * world_to_texture * SOFTSHADOWRADIUS);
}

#ifdef POISSON_FILTER
const vec2[64] poissonDisk = vec2[64](
	vec2(0.170019, -0.040254),
	vec2(-0.299417, 0.791925),
	vec2(0.645680, 0.493210),
	vec2(-0.651784, 0.717887),
	vec2(0.421003, 0.027070),
	vec2(-0.817194, -0.271096),
	vec2(-0.705374, -0.668203),
	vec2(0.977050, -0.108615),
	vec2(0.063326, 0.142369),
	vec2(0.203528, 0.214331),
	vec2(-0.667531, 0.326090),
	vec2(-0.098422, -0.295755),
	vec2(-0.885922, 0.215369),
	vec2(0.566637, 0.605213),
	vec2(0.039766, -0.396100),
	vec2(0.751946, 0.453352),
	vec2(0.078707, -0.715323),
	vec2(-0.075838, -0.529344),
	vec2(0.724479, -0.580798),
	vec2(0.222999, -0.215125),
	vec2(-0.467574, -0.405438),
	vec2(-0.248268, -0.814753),
	vec2(0.354411, -0.887570),
	vec2(0.175817, 0.382366),
	vec2(0.487472, -0.063082),
	vec2(0.355476, 0.025357),
	vec2(-0.084078, 0.898312),
	vec2(0.488876, -0.783441),
	vec2(0.470016, 0.217933),
	vec2(-0.696890, -0.549791),
	vec2(-0.149693, 0.605762),
	vec2(0.034211, 0.979980),
	vec2(0.503098, -0.308878),
	vec2(-0.016205, -0.872921),
	vec2(0.385784, -0.393902),
	vec2(-0.146886, -0.859249),
	vec2(0.643361, 0.164098),
	vec2(0.634388, -0.049471),
	vec2(-0.688894, 0.007843),
	vec2(0.464034, -0.188818),
	vec2(-0.440840, 0.137486),
	vec2(0.364483, 0.511704),
	vec2(0.034028, 0.325968),
	vec2(0.099094, -0.308023),
	vec2(0.693960, -0.366253),
	vec2(0.678884, -0.204688),
	vec2(0.001801, 0.780328),
	vec2(0.145177, -0.898984),
	vec2(0.062655, -0.611866),
	vec2(0.315226, -0.604297),
	vec2(-0.780145, 0.486251),
	vec2(-0.371868, 0.882138),
	vec2(0.200476, 0.494430),
	vec2(-0.494552, -0.711051),
	vec2(0.612476, 0.705252),
	vec2(-0.578845, -0.768792),
	vec2(-0.772454, -0.090976),
	vec2(0.504440, 0.372295),
	vec2(0.155736, 0.065157),
	vec2(0.391522, 0.849605),
	vec2(-0.620106, -0.328104),
	vec2(0.789239, -0.419965),
	vec2(-0.545396, 0.538133),
	vec2(-0.178564, -0.596057)
);

#ifdef COLORED_SHADOWS

vec4 getShadowColor(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float radius = getPenumbraRadius(shadowsampler, smTexCoord, realDistance);
	if (radius < 0.1) {
		// we are in the middle of even brightness, no need for filtering
		return getHardShadowColor(shadowsampler, smTexCoord.xy, realDistance);
	}

	vec2 clampedpos;
	vec4 visibility = vec4(0.0);
	float scale_factor = radius / f_textureresolution;

	int samples = (1 + 1 * int(SOFTSHADOWRADIUS > 1.0)) * PCFSAMPLES; // scale max samples for the soft shadows
	samples = int(clamp(pow(4.0 * radius + 1.0, 2.0), 1.0, float(samples)));
	int init_offset = int(floor(mod(((smTexCoord.x * 34.0) + 1.0) * smTexCoord.y, 64.0-samples)));
	int end_offset = int(samples) + init_offset;

	for (int x = init_offset; x < end_offset; x++) {
		clampedpos = poissonDisk[x] * scale_factor + smTexCoord.xy;
		visibility += getHardShadowColor(shadowsampler, clampedpos.xy, realDistance);
	}

	return visibility / samples;
}

#else

float getShadow(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float radius = getPenumbraRadius(shadowsampler, smTexCoord, realDistance);
	if (radius < 0.1) {
		// we are in the middle of even brightness, no need for filtering
		return getHardShadow(shadowsampler, smTexCoord.xy, realDistance);
	}

	vec2 clampedpos;
	float visibility = 0.0;
	float scale_factor = radius / f_textureresolution;

	int samples = (1 + 1 * int(SOFTSHADOWRADIUS > 1.0)) * PCFSAMPLES; // scale max samples for the soft shadows
	samples = int(clamp(pow(4.0 * radius + 1.0, 2.0), 1.0, float(samples)));
	int init_offset = int(floor(mod(((smTexCoord.x * 34.0) + 1.0) * smTexCoord.y, 64.0-samples)));
	int end_offset = int(samples) + init_offset;

	for (int x = init_offset; x < end_offset; x++) {
		clampedpos = poissonDisk[x] * scale_factor + smTexCoord.xy;
		visibility += getHardShadow(shadowsampler, clampedpos.xy, realDistance);
	}

	return visibility / samples;
}

#endif

#else
/* poisson filter disabled */

#ifdef COLORED_SHADOWS

vec4 getShadowColor(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float radius = getPenumbraRadius(shadowsampler, smTexCoord, realDistance);
	if (radius < 0.1) {
		// we are in the middle of even brightness, no need for filtering
		return getHardShadowColor(shadowsampler, smTexCoord.xy, realDistance);
	}

	vec2 clampedpos;
	vec4 visibility = vec4(0.0);
	float x, y;
	float bound = (1 + 0.5 * int(SOFTSHADOWRADIUS > 1.0)) * PCFBOUND; // scale max bound for soft shadows
	bound = clamp(0.5 * (4.0 * radius - 1.0), 0.5, bound);
	float scale_factor = radius / bound / f_textureresolution;
	float n = 0.0;

	// basic PCF filter
	for (y = -bound; y <= bound; y += 1.0)
	for (x = -bound; x <= bound; x += 1.0) {
		clampedpos = vec2(x,y) * scale_factor + smTexCoord.xy;
		visibility += getHardShadowColor(shadowsampler, clampedpos.xy, realDistance);
		n += 1.0;
	}

	return visibility / max(n, 1.0);
}

#else
float getShadow(sampler2D shadowsampler, vec2 smTexCoord, float realDistance)
{
	float radius = getPenumbraRadius(shadowsampler, smTexCoord, realDistance);
	if (radius < 0.1) {
		// we are in the middle of even brightness, no need for filtering
		return getHardShadow(shadowsampler, smTexCoord.xy, realDistance);
	}

	vec2 clampedpos;
	float visibility = 0.0;
	float x, y;
	float bound = (1 + 0.5 * int(SOFTSHADOWRADIUS > 1.0)) * PCFBOUND; // scale max bound for soft shadows
	bound = clamp(0.5 * (4.0 * radius - 1.0), 0.5, bound);
	float scale_factor = radius / bound / f_textureresolution;
	float n = 0.0;

	// basic PCF filter
	for (y = -bound; y <= bound; y += 1.0)
	for (x = -bound; x <= bound; x += 1.0) {
		clampedpos = vec2(x,y) * scale_factor + smTexCoord.xy;
		visibility += getHardShadow(shadowsampler, clampedpos.xy, realDistance);
		n += 1.0;
	}

	return visibility / max(n, 1.0);
}

#endif

#endif
#endif

vec3 get_transparent_reflections(vec4 base, vec3 eyePosition, vec3 cameraOffset, vec3 worldPosition,
                        vec3 v_LightDirection, vec3 dayLight, vec4 col, float f_adj_shadow_strength,
                        vec3 vNormal, float shadow_int)
{
    if(base.a > 0.9) return vec3(0.0);
    shadow_int *= f_adj_shadow_strength; //adjust by strength

    // Get the Y component of base.rgb converted to YCbCr as an approximate
    // brightness of the albedo
    float albedo_y = dot(base.rgb, vec3(0.299, 0.587, 0.114));
    albedo_y = albedo_y - min(shadow_int,albedo_y); //remove from the shadows

    // There are no specular map textures, so approximate the shininess
    // and specular reflections strength with albedo_y
    float shininess = 6.0 + (16.0 * (1.0 - albedo_y));
    float specular_visibility = albedo_y; //pow(albedo_y, 3.0);

    // view_dir: Vector from the fragment to the eye in world space.
    // (eyeVec is view_dir in view space, but v_LightDirection is in
    // world space)
    vec3 view_dir = normalize((eyePosition - cameraOffset) - worldPosition);
    vec3 halfway = normalize(normalize(view_dir) + normalize(-v_LightDirection));

    // Colour (and intensity) of the sun/moon light
    vec3 light_colour = mix(dayLight.rgb/4, col.rgb, 0.5);

    float multiplier = 7.0;
    specular_visibility *= multiplier - (shadow_int*multiplier); //set shadow correctly

    // Calculate specular reflections with the Blinn-Phong model
    float spec = specular_visibility * pow(max(dot(vNormal, halfway), 0.0), shininess);
    
    vec3 retVal = light_colour * spec;
    return retVal;
}

void main(void)
{
	vec3 color;
	vec2 uv = varTexCoord.st;

	vec4 base = texture2D(baseTexture, uv).rgba;
	// If alpha is zero, we can just discard the pixel. This fixes transparency
	// on GPUs like GC7000L, where GL_ALPHA_TEST is not implemented in mesa,
	// and also on GLES 2, where GL_ALPHA_TEST is missing entirely.
#ifdef USE_DISCARD
	if (base.a == 0.0)
		discard;
#endif
#ifdef USE_DISCARD_REF
	if (base.a < 0.5)
		discard;
#endif

	color = base.rgb;
	vec4 col = vec4(color.rgb * varColor.rgb, 1.0);

#ifdef ENABLE_DYNAMIC_SHADOWS
	if (f_shadow_strength > 0.0) {
		float shadow_int = 0.0;
		vec3 shadow_color = vec3(0.0, 0.0, 0.0);
		vec3 posLightSpace = getLightSpacePosition();

		float distance_rate = (1.0 - pow(clamp(2.0 * length(posLightSpace.xy - 0.5),0.0,1.0), 10.0));
		if (max(abs(posLightSpace.x - 0.5), abs(posLightSpace.y - 0.5)) > 0.5)
			distance_rate = 0.0;
		float f_adj_shadow_strength = max(adj_shadow_strength-mtsmoothstep(0.9,1.1,  posLightSpace.z),0.0);

		if (distance_rate > 1e-7) {

#ifdef COLORED_SHADOWS
			vec4 visibility;
			if (cosLight > 0.0 || f_normal_length < 1e-3)
				visibility = getShadowColor(ShadowMapSampler, posLightSpace.xy, posLightSpace.z);
			else
				visibility = vec4(1.0, 0.0, 0.0, 0.0);
			shadow_int = visibility.r;
			shadow_color = visibility.gba;
#else
			if (cosLight > 0.0 || f_normal_length < 1e-3)
				shadow_int = getShadow(ShadowMapSampler, posLightSpace.xy, posLightSpace.z);
			else
				shadow_int = 1.0;
#endif
			shadow_int *= distance_rate;
			shadow_int = clamp(shadow_int, 0.0, 1.0);

		}

		// turns out that nightRatio falls off much faster than
		// actual brightness of artificial light in relation to natual light.
		// Power ratio was measured on torches in MTG (brightness = 14).
		float adjusted_night_ratio = pow(max(0.0, nightRatio), 0.6);

		// Apply self-shadowing when light falls at a narrow angle to the surface
		// Cosine of the cut-off angle.
		const float self_shadow_cutoff_cosine = 0.035;
		if (f_normal_length != 0 && cosLight < self_shadow_cutoff_cosine) {
			shadow_int = max(shadow_int, 1 - clamp(cosLight, 0.0, self_shadow_cutoff_cosine)/self_shadow_cutoff_cosine);
			shadow_color = mix(vec3(0.0), shadow_color, min(cosLight, self_shadow_cutoff_cosine)/self_shadow_cutoff_cosine);
		}

		shadow_int *= f_adj_shadow_strength;

        vec3 reflections = get_transparent_reflections(base, eyePosition, cameraOffset, worldPosition,
                        v_LightDirection, dayLight, col, f_adj_shadow_strength,
                        vNormal, shadow_int);

		// calculate fragment color from components:
		col.rgb =
				adjusted_night_ratio * col.rgb + // artificial light
				(1.0 - adjusted_night_ratio) * ( // natural light
						col.rgb * (1.0 - shadow_int * (1.0 - shadow_color)) +  // filtered texture color
                        reflections +
						dayLight * shadow_color * shadow_int);                 // reflected filtered sunlight/moonlight
	}
#endif

	// Due to a bug in some (older ?) graphics stacks (possibly in the glsl compiler ?),
	// the fog will only be rendered correctly if the last operation before the
	// clamp() is an addition. Else, the clamp() seems to be ignored.
	// E.g. the following won't work:
	//      float clarity = clamp(fogShadingParameter
	//		* (fogDistance - length(eyeVec)) / fogDistance), 0.0, 1.0);
	// As additions usually come for free following a multiplication, the new formula
	// should be more efficient as well.
	// Note: clarity = (1 - fogginess)
	float clarity = clamp(fogShadingParameter
		- fogShadingParameter * length(eyeVec) / fogDistance, 0.0, 1.0);
	col = mix(skyBgColor, col, clarity);
	col = vec4(col.rgb, base.a);

	gl_FragData[0] = col;
}
Wooow it looks very cool.
Small question: or do you have to copy the code for it to work?

User avatar
apercy
Member
Posts: 640
Joined: Wed Mar 25, 2020 16:31
GitHub: APercy
In-game: APercy
Location: Pinheiral - RJ - Brazil

Re: Post your screenshots!

by apercy » Post

Horka wrote:
Fri Mar 03, 2023 10:06
...
Wooow it looks very cool.
Small question: or do you have to copy the code for it to work?
do a backup of your file named "opengl_fragment.glsl". You can find it at "minetest\client\shaders\nodes_shader". Then put the new file at it's place. And do not forget to turn the shadows on.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Post your screenshots!

by ShadMOrdre » Post

Random generative cities.
Attachments
screenshot_20230303_114514.jpg
screenshot_20230303_114514.jpg (379.23 KiB) Viewed 3132 times
screenshot_20230303_083703.jpg
screenshot_20230303_083703.jpg (210.9 KiB) Viewed 3132 times
screenshot_20230303_080821.jpg
screenshot_20230303_080821.jpg (321.48 KiB) Viewed 3132 times

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Post your screenshots!

by Extex » Post

Backrooms test with 5.7 shaders
Attachments
screenshot_20230304_175527.png
screenshot_20230304_175527.png (551.04 KiB) Viewed 3077 times
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Post your screenshots!

by Inocudom » Post

Extex wrote:
Sun Mar 05, 2023 02:34
Backrooms test with 5.7 shaders
)-( This right here is a new high for Minetest and its subgames. )-(

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Post your screenshots!

by Inocudom » Post

Image
)-( In the world of Marchland, a Pisces princess sets up her home in some old ruins. )-(

crisdan
New member
Posts: 7
Joined: Wed Oct 12, 2022 02:32
GitHub: cristian
IRC: cris
In-game: crisdan

Re: Post your screenshots!

by crisdan » Post

is the server already open?

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: Post your screenshots!

by jp » Post

Minetest @ 2000 nodes of viewing range:

Image

User avatar
Blockhead
Member
Posts: 1624
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Post your screenshots!

by Blockhead » Post

jp wrote:
Thu Mar 09, 2023 01:13
Minetest @ 2000 nodes of viewing range:
Is it just distortion around the edges the perspective projection that make this look like a round earth? Kinda funky. Distance fog begins to actually make some sense at this render distance which is nice.

Did you know that you can ride a bike and bounce on a trampoline at the same time? :D
Attachments
screenshot_20230208_213052.png
screenshot_20230208_213052.png (246.7 KiB) Viewed 3099 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: Post your screenshots!

by jp » Post

Blockhead wrote:
Thu Mar 09, 2023 03:58
Is it just distortion around the edges the perspective projection that make this look like a round earth? Kinda funky.
It's an increased FOV, which is actually a distortion of the camera projection matrix.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: Post your screenshots!

by jp » Post

4000 nodes viewing range:

Image

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: Post your screenshots!

by the_raven_262 » Post

Very high viewing range, but its foggy. Oh and for some reason the sky seems to light up the distant fog making it lighter? I'm not sure that is how the fog would work.
Image
Image
Image
I got reminded of these experiments by jp's posts above. This skybox is made to blend with the distant terrain as much as possible. I intentionally didn't add any detail to it except for the color gradients so that the distance is only conveyed by the gradients.

There are two ways to break the illusion of blending, one is by moving horizontally and the other is by climbing to a higher spot. Generally, if the horizon of the skybox doesn't line up with the actual horizon the skybox illusion breaks. Which is why it is best to leave the terrain out of a skybox and only make it depict the sky. Though, a *sky* skybox can still have a horizon line and that is what should be avoided in this case.

Of course, leaving out the distant terrain makes conveying the sense of scale (the thing that skyboxes usually do) really hard or maybe impossible.

The reason that the illusion breaks during horizontal movement is because:
1. new terrain is loaded by minetest (okay thats kinda obvious)
2. the provided terrain doesn't stretch so far as to imply that the skybox's terrain, which is behind it, should have zero distortion as the player moves (those layers of mountains would be seen becoming larger and at different speeds)

Another thing that I keep noticing is the mandatory filtering on the skybox textures, which no matter what resolution they are makes them look blurry.

So, while making a skybox that conveys the sense of scale in a sandbox world is quite hard, using a skybox that has a horizon line is still an option if the player's vertical movement is restrained, the horizon is lined up properly and a lot of *real* distant terrain is provided (unreachable, of course) for proper blending.

The actual dynamic skybox terrain could be made, but that is a huge pain to do. A less troublesome feature implementation would (probably) be to allow putting a model as a skybox, and have the skybox camera be offset on the vertical axis a tiny bit as the player moves up as to align the skybox horizon with the world horizon. Still, the illusion would break upon the (not so) close inspection of the horizon while moving. Also where's the limit to that vertical camera movement?

And this is all not considering the implementation of the day/night cycle in a skybox. Which I did try doing by fading from one skybox texture to another over the course of an ingame day. Spoiler alert: I ran out of memory and it would freeze for a moment every time the texture got replaced. Because minetest has to generate a new texture when overlaying one over the other.

So yeah, those were some of my adventures with skyboxes in minetest. They can be used in a much smaller number of cases than I've thought, but my ideas were pretty far-fetched anyway.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests