Skip to content

Releases: roalyr/godot-for-3d-open-worlds

GF3DOW-4.x-2024.10.19

19 Oct 12:10
88a3427
Compare
Choose a tag to compare

logo_gow

Implemented tweaks:

  • Far plane (z-far) upper limit is set to 9e18 meters.
  • Large World Coordinates are used when compiling (double precision floats).
  • Increased editor zoom out distance to galactic scale (depth buffer must be adjusted for such scales, see below).
  • Implemented tweaks to mobile rendering back-end to fix possible precision-related issues.
  • Increased editor zoom increment for faster zooming.

Suggested:

  • Use logarithmic depth in your spatial shaders to achieve rendering at extreme distances (if reverse depth buffer is not enough)
    without z-fighting. Keep in mind that this may break some depth-related effects and shadow-casting.
// Add this before your vertex shader.
// Edit "Fcoef" to adjust for desirable view distance. Lesser number means further distance limit.
uniform float Fcoef = 0.001;
varying float gl_Position_z;

// Add this to your vertex shader.
void vertex()
{
	vec4 gl_Position = MODELVIEW_MATRIX*vec4(VERTEX, 1.0);
	gl_Position_z = gl_Position.z;
}

//Add this to your fragment shader.
void fragment()
{
	DEPTH = log2(max(1e-6, 1.0 -gl_Position_z)) * Fcoef;
}


  • Use spatial shader material dithering for better de-banding on per-material basis.
// Add this before your vertex shader.
// Edit "dither_darken" to adjust the brightness of dither pattern (optional).
uniform float dither_darken :  hint_range(0.5, 1.0, 5e-4) = 0.75;

const float dither_x = 172.7;
const float dither_y = 232.6;
const float dither_r = 105.5;
const float dither_g = 99.0;
const float dither_b = 110.0;

vec3 interleaved_gradient_noise(vec2 frag_coord) {
	vec3 dither = vec3(dot(vec2(dither_x, dither_y), frag_coord));
	dither.rgb = fract(dither.rgb / vec3(dither_r, dither_g, dither_b));
	return (dither.rgb - vec3(dither_darken)) / 255.0;
}

//Add this to your fragment shader.
void fragment()
{
	vec2 frag_coord = FRAGCOORD.xy;
	ALBEDO += interleaved_gradient_noise(frag_coord);
}


GF3DOW-3.x-2024.10.19

19 Oct 19:53
37863c6
Compare
Choose a tag to compare

logo_gow

Implemented tweaks:

  • Far plane (z-far) upper limit is set to 9e18 meters.
  • Increased editor zoom out distance to galactic scale (depth buffer must be adjusted for such scales, see below).
  • Increased editor zoom increment for faster zooming.

WARNING!
This 3.x fork build DOES NOT implement hard-coded logarithmic depth buffer anymore.
The reason to not to implement this solution is to give users the ability to implement it in their shader materials if needed.
Another reason lies in the fact that hard-coded logarithmic depth buffer breaks all depth-related effects and shading.

You can use logarithmic depth in your spatial shaders to achieve rendering at extreme distances
without z-fighting. Keep in mind that this may break some depth-related effects and shadow-casting.

// Add this before your vertex shader.
// Edit "Fcoef" to adjust for desirable view distance. Lesser number means further distance limit.
uniform float Fcoef = 0.001;
varying float gl_Position_z;

// Add this to your vertex shader.
void vertex()
{
	vec4 gl_Position = MODELVIEW_MATRIX*vec4(VERTEX, 1.0);
	gl_Position_z = gl_Position.z;
}

//Add this to your fragment shader.
void fragment()
{
	DEPTH = log2(max(1e-6, 1.0 -gl_Position_z)) * Fcoef;
}


Suggested:

  • Use built-in LOD system.

GF3DOW-4.x-2024.09.22

22 Sep 06:39
fac3a95
Compare
Choose a tag to compare

Previous release

GF3DOW-3.x-2024.09.22

22 Sep 21:35
b48cb7e
Compare
Choose a tag to compare

Previous release.