Merge pull request #89528 from Calinou/basematerial3d-height-allow-in-compatibility
Allow BaseMaterial3D height/dither fade to work with Compatibility rendering
This commit is contained in:
commit
41cc256d63
1 changed files with 8 additions and 10 deletions
|
@ -1337,7 +1337,7 @@ void fragment() {)";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Heightmapping isn't supported at the same time as triplanar mapping.
|
// Heightmapping isn't supported at the same time as triplanar mapping.
|
||||||
if (!RenderingServer::get_singleton()->is_low_end() && features[FEATURE_HEIGHT_MAPPING] && !flags[FLAG_UV1_USE_TRIPLANAR]) {
|
if (features[FEATURE_HEIGHT_MAPPING] && !flags[FLAG_UV1_USE_TRIPLANAR]) {
|
||||||
// Binormal is negative due to mikktspace. Flipping it "unflips" it.
|
// Binormal is negative due to mikktspace. Flipping it "unflips" it.
|
||||||
code += R"(
|
code += R"(
|
||||||
{
|
{
|
||||||
|
@ -1637,7 +1637,6 @@ void fragment() {)";
|
||||||
// Use the slightly more expensive circular fade (distance to the object) instead of linear
|
// Use the slightly more expensive circular fade (distance to the object) instead of linear
|
||||||
// (Z distance), so that the fade is always the same regardless of the camera angle.
|
// (Z distance), so that the fade is always the same regardless of the camera angle.
|
||||||
if ((distance_fade == DISTANCE_FADE_OBJECT_DITHER || distance_fade == DISTANCE_FADE_PIXEL_DITHER)) {
|
if ((distance_fade == DISTANCE_FADE_OBJECT_DITHER || distance_fade == DISTANCE_FADE_PIXEL_DITHER)) {
|
||||||
if (!RenderingServer::get_singleton()->is_low_end()) {
|
|
||||||
code += "\n {";
|
code += "\n {";
|
||||||
|
|
||||||
if (distance_fade == DISTANCE_FADE_OBJECT_DITHER) {
|
if (distance_fade == DISTANCE_FADE_OBJECT_DITHER) {
|
||||||
|
@ -1661,7 +1660,6 @@ void fragment() {)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
code += R"(
|
code += R"(
|
||||||
// Distance Fade: Pixel Alpha
|
// Distance Fade: Pixel Alpha
|
||||||
|
|
Loading…
Reference in a new issue