https://proud-production.itch.io/deathgun i have problems with my game where you have to enable full screen or things will look weird
#HELLPPP screen issuses
94 messages · Page 1 of 1 (latest)
vhs settings
project settings
what things look weird how?
i assume that's the postprocessing shader?
this is how the level up menu looks like on my smaller screen
It's a vhs shader with a color rect node
what happens if you turn that crt shader off and try playing it in a smaller window, does that look right?
Let me see
just to figure out if it's a shader or ui issue
does it have to do with these settings?
no, it has to do with disabling that crt shader and checking whether it looks wrong still then.
just make whatever node that shader is on (looks like a colorrect ig) invisible, run your game and see what it does when you make the window smaller
(and then tell/show the result)
is that what it's supposed to look like?
No
then you have some problems with your ui positions, i'd say. what stretch/scale mode is that window on?
no. as i asked:
what stretch/scale mode is that window on?
the game window or the machine?
the one your game lives in. the only window.
so stretching is disabled
so as you resize the window, the canvas gets resized, not stretched.
should it be canvas items or viewport?
probably wanna turn that to canvas_items instead, so the canvas coordinate grid gets stretched
(viewport instead scales the output image, which you probably dont want)
essentially, if a node is at 100,100 and you stretch twice in canvas mode, it'll render at 200,200 at the large resolution. if you stretch twice in viewport mode, it renders at 100,100 at the small resolution, then grabs every pixel it rendered and scales them up.
remember to try without the shader first, so we can see if your UI is fixed first just in case both are behaving wonky.
Well shit
i tried with shader but there is another problem now
The screen is eated from both sides
also unrelated but while we're at it, that black popup thing (levelup menu i think) is scaled like crazy, dont do that, makes it all ugly and pixelated, just increase the actual font size instead.
then try without it like i said and see if it's fixed
Without it
ok please show that again but scrolled down further, and without that search filter in the top.
(specifically i need to see all of the "Stretch" section)
ah i see
you're designing for a rectangular window right?
like one that's wider than tall, like most screens?
Yes
but you told it in "Size-> Viewport Width/Height" to assume a square one for its base
so you've actually designed outside your base viewport
so now with it stretching correctly, it'll crop all that off.
i get it now but what do i change it to?
set the base viewport size at the top there to what you actually want as your default window size, then fix your design (use the purple box in the editor as guides, that's that size).
I dont know how much i should put
that's completely up to you. could e.g. be the resolution of your screen. or whatever default window size you want. or whatever the size in the website you're embedding it in, etc.
well yeah i told you the problem, you put some of your game outside its "coordinate grid"
and you didnt notice because you told it to ignore that setting when stretching (with stretch_mode = disabled). now you fixed that, so now your problem becomes visible.
looking if "it works on my machine" wont actually help you much tho, please tell what you changed and if everything lines up right at the various sizes now, still without the shader running.
Set the Stretch mode to "Viewport" instead of "Canvas Items"
If I had to guess, you don't have the anchors set properly on your ColorRect with the shader and that's causing the UVs to extend beyond the visible game window when it's rescaled. If you stretch based on the viewport that won't matter, and it will fix the bug with the camera being "zoomed in" on smaller screens
the actual fix for this would be to use SCREEN_UV instead of a hardcoded resolution in the shader. and that's one for later after terry confirmed his unshaded UI works.
Did they send the shader code?
no, but a screenshot of where they hardcoded the resolution into a uniform. and again, please let's fix the input of the shader before fixing the shader. "garbage in, garbage out" and all that, it's way harder to debug a shader if its input sampler already is wrong.
the ordering and naming of uniforms lines up with this shader from the godotshaders site: https://godotshaders.com/shader/vhs-and-crt-monitor-effect/
which is using SCREEN_UV (line 98). That resolution parameter is for the pixellation effect
ah according to that they just used that parameter wrong 😛
so @tough radish since discord says you keep popping in here to read this, would you mind answering that question?
i am actually away from where i work right now
what i changed was the strech mode to canvas items
and res to 1920, 1080
yes i use this one
i want the screen to fit everything in for every size of screens
now this haseverything
but not the same colour as full screen
i should also set the ui order higher than enemies but that is another task
so?
what should i change