View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000557 | Medieval Engineers | Enhancement | public | 2026-03-18 13:57 | 2026-07-09 10:13 |
| Reporter | peaceman | Assigned To | equinox | ||
| Priority | normal | Severity | tweak | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Platform | Windows | ||||
| Target Version | 0.7.4.58E24F | Fixed in Version | 0.7.4.58E24F | ||
| Summary | 0000557: OIT treats all billboards farther than 200m the same | ||||
| Description | In Globals.hlsli change 200 to 2000 in float invZ = clamp(1 + linearZ / 200, 0.01, 1); This is an important change as it fixes a problem where transparent materials like particles and billboards look very bright or dark when another transparent material is behind it further than 200m away and also changes the transparency of the material in the back. Have not noticed any side effects of it being set to 2000. Another shader adjustment that would be nice to have is in Clouds.hsls These changes prevents the sun from shining through thick cloud layers when its low on the horizon and improves the interaction of the sun with the clouds when its going behind the horizon The following 2 lines need to be replaced float shadingMultiplier = clamp(pow(abs((1 - dot(input.normal, frame_.Light.directionalLightVec)) / 2), 2.0), 0.025, 1); output = float4(colorSample, alphaSample) * shadingMultiplier * edgeFactor; with: // Planet-scale day/night from cloud shell position float3 shellNormal = normalize(input.positionWorld.xyz - centerPosition); // If this lights the wrong side, remove the minus sign. float3 sunDir = -frame_.Light.directionalLightVec; // Sun angle relative to the viewer-side horizon float3 viewNormal = normalize(cameraPosition - centerPosition); float viewSun = dot(viewNormal, sunDir); // Manual smoothstep for broad global sunset fade float globalSunFade = saturate((viewSun - (-0.45)) / (0.00 - (-0.45))); globalSunFade = globalSunFade * globalSunFade * (3.0 - 2.0 * globalSunFade); // Manual smoothstep for local day/night band float localDay = saturate(dot(shellNormal, sunDir) + 0.6); localDay = localDay * localDay * (3.0 - 2.0 * localDay); // Local cloud detail lighting float detailLight = saturate(dot(input.normal, sunDir)); detailLight = lerp(0.45, 1.0, detailLight * detailLight); // Final lighting float lighting = globalSunFade * localDay * detailLight; float cloudAlpha = saturate(alphaSample * edgeFactor); // Extra thickness where sunlit clouds would otherwise let the sun through float occlusionBoost = lerp(1.5, 2.5, globalSunFade * localDay); cloudAlpha = 1.0 - pow(1.0 - cloudAlpha, occlusionBoost); output.rgb = colorSample * edgeFactor * lighting; output.a = cloudAlpha; | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-03-18 13:57 | peaceman | New Issue | |
| 2026-04-08 12:18 | equinox | Assigned To | => equinox |
| 2026-04-08 12:18 | equinox | Status | new => in progress |
| 2026-04-08 12:18 | equinox | Target Version | => 0.7.4.58E24F |
| 2026-04-08 12:19 | equinox | Summary | Shader adjustments => OIT treats all billboards farther than 200m the same |
| 2026-07-02 10:59 | equinox | Status | in progress => resolved |
| 2026-07-02 10:59 | equinox | Fixed in Version | => 0.7.4.58E24F |
| 2026-07-09 10:13 | equinox | Resolution | open => fixed |