Skip to content

[4.3] Add CLIP_SPACE_FAR built-in to spatial shader - #108360

Open
aaronfranke wants to merge 1 commit into
godotengine:4.3from
aaronfranke:4.3-shader_clip_space_far
Open

[4.3] Add CLIP_SPACE_FAR built-in to spatial shader#108360
aaronfranke wants to merge 1 commit into
godotengine:4.3from
aaronfranke:4.3-shader_clip_space_far

Conversation

@aaronfranke

@aaronfranke aaronfranke commented Jul 6, 2025

Copy link
Copy Markdown
Member

Manual backport of PR #95057 to the Godot 4.3 branch because there were conflicts. I tested that this works.

I resolved conflicts, but otherwise the code is entirely from @Chaosus's original PR.

@paddy-exe

Copy link
Copy Markdown
Contributor

Is there a specific reason why this particular feature should be backported to 4.3?
This goes against semantic versioning specs.

@dsnopek

dsnopek commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

I think backporting this could make sense.

Shaders that write to POSITION need to know the CLIP_SPACE_FAR, which is different between compatibility and the RD renderers. Having this in Godot 4.3 allows putting shaders on the Godot asset library that are compatible with more renderers and versions.

That said, as we keep moving forward, and Godot 4.3 gets older and older, I think this makes less sense.

@aaronfranke

aaronfranke commented Aug 29, 2025

Copy link
Copy Markdown
Member Author

@paddy-exe I have a project which tries to target multiple Godot versions and renderers, and makes use of this constant. The lack of this feature is the biggest problem inhibiting 4.3 support. I would greatly appreciate having this backported.

In my case it's an engine module, so just having this in the 4.3 branch is sufficient, even if it's not in a patch release yet.

@paddy-exe

paddy-exe commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

@dsnopek @aaronfranke Be that as it may, I believe this backport would set a bad precedent for backporting features to a previous release branch. The same logic could probably be used by several other plugin/extension developers and their cases (both for past and future versions).

I will put this up for discussion at the next rendering meeting.

@paddy-exe

Copy link
Copy Markdown
Contributor

After discussing this in the rendering meeting, the team has concluded that the decision if this should be merged belongs more to the release management team. Moreover, it declared the PR helpful for shader authors and a very safe change.

@aaronfranke
aaronfranke force-pushed the 4.3-shader_clip_space_far branch from 002de25 to 971f0e8 Compare October 30, 2025 01:23
@aaronfranke
aaronfranke force-pushed the 4.3-shader_clip_space_far branch from 971f0e8 to 878354d Compare April 8, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants