You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enabling UV2 Triplanar doesn't have this issue. I found this out while working on #89267 🙂
It probably doesn't make sense to have both triplanar and MSDF enabled at the same time, so triplanar should probably "win" here like we do for height mapping (where height mapping is ignored when triplanar is enabled):
if (features[FEATURE_HEIGHT_MAPPING] && flags[FLAG_UV1_USE_TRIPLANAR]) {
// Display both resource name and albedo texture name.
// Materials are often built-in to scenes, so displaying the resource name alone may not be meaningful.
// On the other hand, albedo textures are almost always external to the scene.
if (textures[TEXTURE_ALBEDO].is_valid()) {
WARN_PRINT(vformat("%s (albedo %s): Height mapping is not supported on triplanar materials. Ignoring height mapping in favor of triplanar mapping.", get_path(), textures[TEXTURE_ALBEDO]->get_path()));
} elseif (!get_path().is_empty()) {
WARN_PRINT(vformat("%s: Height mapping is not supported on triplanar materials. Ignoring height mapping in favor of triplanar mapping.", get_path()));
} else {
// Resource wasn't saved yet.
WARN_PRINT("Height mapping is not supported on triplanar materials. Ignoring height mapping in favor of triplanar mapping.");
}
}
Steps to reproduce
Create a StandardMaterial3D and assign it to a MeshInstance.
Enable Albedo > Texture MSDF and UV1 > Triplanar.
Notice the material turning gray and look at the Output panel.
Tested versions
System information
Godot v4.3.dev (da945ce) - Fedora Linux 39 (KDE Plasma) - Wayland - GLES3 (Compatibility) - NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)
Issue description
Enabling Albedo Texture MSDF and UV1 Triplanar at the same time results in a shader compilation error:
Enabling UV2 Triplanar doesn't have this issue. I found this out while working on #89267 🙂
It probably doesn't make sense to have both triplanar and MSDF enabled at the same time, so triplanar should probably "win" here like we do for height mapping (where height mapping is ignored when triplanar is enabled):
godot/scene/resources/material.cpp
Lines 1146 to 1158 in da945ce
Steps to reproduce
Minimal reproduction project (MRP)
test_triplanar_msdf.zip
The text was updated successfully, but these errors were encountered: