Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting to use nearest-neighbor filtering for ReflectionProbes #8063

Open
DarkDruid216 opened this issue Oct 10, 2023 · 2 comments · May be fixed by godotengine/godot#83172
Open

Add a setting to use nearest-neighbor filtering for ReflectionProbes #8063

DarkDruid216 opened this issue Oct 10, 2023 · 2 comments · May be fixed by godotengine/godot#83172

Comments

@DarkDruid216
Copy link

DarkDruid216 commented Oct 10, 2023

Describe the project you are working on

A turn based tactics game that looks like something from the 1990’s.
Instead of using speculars/catchlights, the speculars are baked into the texture.
The reflection probes, though, are for important items to collect.

Describe the problem or limitation you are having in your project

Upon experimenting with reflection probes, I can see I couldn’t necessarily toggle it to point to get the aesthetic of a PS1 game.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Make it a feature on the reflection probe node to allow for users to toggle the filtering of reflection textures for Godot 3 and 4.
This also goes for the resolution of the texture.
latest

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

On the inspector for the reflection probe node, the reflection texture’s resolution would be a simple int that changes the resolution of the texture upon the value being changed.
For the filtering, that would be an enum with point being one of them to disable filtering.

You can set the default values in the project settings or the environment resources.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don’t think so. I’ve look and asked others.

Is there a reason why this should be core and not an add-on in the asset library?

I felt it would be easily to do.
That, and it could work well for users who’re making retraux PS1 games just the same.

@Calinou Calinou changed the title Point filtered reflection probes. Add a setting to use nearest-neighbor filtering for ReflectionProbes Oct 10, 2023
@Calinou
Copy link
Member

Calinou commented Oct 10, 2023

For performance reasons, this may not warrant a per-node setting and may be better to implement as a project setting. This is what decals and light projectors provide (both of which are clustered elements, like reflection probes).

I have a working prototype at https://github.com/Calinou/godot/tree/reflection-add-filter-setting, but it doesn't look great with increasing roughness (reflection size was decreased to 32 for demonstration purposes):

reflection_nearest.mp4

Testing project: test_reflection_nearest_neighbor.zip
(compile the linked branch above to see a difference)

@DarkDruid216
Copy link
Author

For performance reasons, this may not warrant a per-node setting and may be better to implement as a project setting. This is what decals and light projectors provide (both of which are clustered elements, like reflection probes).

I have a working prototype at https://github.com/Calinou/godot/tree/reflection-add-filter-setting, but it doesn't look great with increasing roughness (reflection size was decreased to 32 for demonstration purposes):

reflection_nearest.mp4

Testing project: test_reflection_nearest_neighbor.zip (compile the linked branch above to see a difference)

That might just suffice.
Thanks for the help! B3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs review/testing
Development

Successfully merging a pull request may close this issue.

2 participants