-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE #70967
Conversation
I think we are good without them. If users complain and make a good case we can add them back, but the new syntax to do this should still be easy enough. |
5462a62
to
385a905
Compare
@reduz pushed requested changes and added doc updates for CI |
This PR will conflict with #71455, so whichever one is merged first the other will need second will need a rebase. Also, we need to explicitly mention the removal of |
Indeed, we're going to have to make sure we keep the functionality for making this work in stereo and switching the sampler type. I have to admit I'm worried about the impact of this especially so close to 4.0s release, but at the same time this also isn't a change we want to introduce halfway through a major release cycle. I wonder if an intermediate solution would be to at least have a proper warning generated if someone is still using the old syntax, if it just gives a bland syntax error it's going to throw off a lot of people converting their Godot 3 projects or with existing Godot 4 projects if they don't read the release notes carefully. |
in favour of texture hints
385a905
to
faea9f5
Compare
@BastiaanOlij Updated to do 2 more things:
|
@clayjohn I LOVE IT! |
Looks great!
I believe we should enable line wrapping and either let the error panel span more than two lines, or add a vertical scrollbar when needed. But that can be done in a separate PR. |
Thanks! |
So this seems to break everything that used it which is fine except that it also includes the StandardMaterial (eg proximity fade is broken) Edit; Come to think of it I guess things like the proximity fade node in visual shaders might be broken as well. |
SCREEN_TEXTURE just doesn't work. Am I doing something wrong? |
I did some testing and the issue seems to be with the "hint_screen_texture" hint. Using this results in the shader not giving any output. (v4.0.beta14.official) |
The error tells you that you are redefining |
thanks, changed it to "const float PII = 3.14159265359;" something like: if ( key_space ): it should be an easy one, but cant find in the manual |
My point was that you can simply remove this line... For the rest, please use other community platforms (e.g. Discord or the Q&A) to ask support questions, this is a merged PR and the discussion should only be about this PR. |
I think it makes it awkward to use shaders that were written before GD4, it might even be more convenient if the default shader template contained the hint as so many shaders use it and screen_texture is one of the most important uses of a shader. |
Follow up to https://twitter.com/reduzio/status/1609687033450229760
Reduz and I have discussed this at great length. I was in favour of keeping
SCREEN_TEXTURE
,DEPTH_TEXTURE
, andNORMAL_ROUGHNESS_TEXTURE
as an easy-to-use pathway for screen-space sampling. Reduz preferred to remove them as the new pathway is not complicated and can be much better for performance.This PR removes
SCREEN_TEXTURE
,DEPTH_TEXTURE
, andNORMAL_ROUGHNESS_TEXTURE
, and exposes the new hint to visual shaders (no changes were needed to text shaders). This PR also cleans up a few bugs related to using these textures.Now users will always have to use the hint syntax so this:
becomes this
Or for the others:
The repeat mode and filter setting can be whatever you want.
CC @reduz