Closed Xtarsia closed 1 month ago
Im unable to get web export working, i suspect due to needing custom export template build for terrain 3D, or something along those lines.
As for textures import settings for 4.2, both options work.
I'll add some initial things to platform.md in the mean time.
In compatibility mode, the minimum.gdshader complains about fma, even though it isn't connected to anything. I had to comment it out.
My notes on getting webgl working have been moved to #502 . It isn't successful yet.
Nice work. Aside from webgl, it works well. It even stutters just like I remember in Godot 3. :/
The lack of visual indication for the slope tool is a problem. Drawable is not intuitive without it. If you don't already know how it works it will be easy to be confused by it. What can we do about this?
Figuring out how to build for web won't hold this PR or release up.
It renders very differently. Brighter, stronger normals, half the speed.
I think I need to tidy up the regex stuff a bit still.
It seems that all the samplers need highp. Including those in uniforms.glsl. Mistakenly posted an update here
This PR https://github.com/godotengine/godot/pull/85430 should make correctly determining when to use compatibility modifications much simpler.
Ok, down to 4 clean, topical commits. Thanks for all the work on this. It will help a lot of people.
Admin edit: Fixes #217
Detects whether Godot is using the compatibility renderer.
If so, The generated shader will have a set of #defines added that allow full support for the standard shader. The shader override will have the #defines visible at the begining on the shader, before shader_type.
The editor will inject code at the begining, and the end either the standard shader, or any provided override shader in order to draw a "decal" on the terrain.
in the interest of simplicity, the gdscript changes are as small as possible, tho some things are a bit inneficient, performace is fine and its only during editing anyways.
The slope tool doesnt have propper decal support.adding terrain3d.get_compatibility() seems a bit dubious to me, but saved repeating a ton of code in gdscript, and ensures that the editor is always on the same page.
Finally, there are no warnings at the moment when the albedo and normal arrays are in compressed mode. for 4.3 this is fixed anyways, but for 4.2 all textures will be black. The workaround is to re-import all textures as "Lossless". Resizing to half resolution results in the same VRAM use for Lossless vs Compressed at the original size.
EDIT: recently updated test version is available: https://github.com/Xtarsia/Terrain3D/actions/runs/11079134556