Print Shadow Settings

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BillRogers

I’m working on a graphics option menu and am stuck on controlling shadow settings. Currently I’m setting shadow quality through


Problem is that there’s only a “set” function and no way I’ve found to print the setting value to make sure things were set right. Anyone have any advice on setting/debugging shadow options?

:bust_in_silhouette: Reply From: jgodfrey

I’m not really familiar with the details here, but looking at the docs, both of the mentioned methods accept a simple ShadowQuality enum (with values 0-6) which is documented here:

Maybe I don’t understand what you’re asking, but if you just want some text to represent each value in your UI, you’ll probably have to create that yourself. In that case, you could simply map some UI string with the underlying enum value. Maybe something like:

var shadow_map = {
    RenderingServer.SHADOW_QUALITY_HARD: "the text description",
    RenderingServer.SHADOW_QUALITY_SOFT_VERY_LOW: "another description",

Though, maybe I don’t understand the question?

You may be onto something but my main problem is accessing what ShadowQuality is currently being used. There’s the “set” function I listed above but there’s no “soft shadow filter _get quality”; no way to check the value once it’s set that I’m aware of. Once I set the ShadowQuality, is there any way to print it from Godot’s settings to double check that it’s set to the right value?

BillRogers | 2023-03-13 21:54

Ah, yeah - I understand now. Again, I’m really not familiar with the details here, but I’d guess you might just need to set some initial ShadowQuality value as your game starts up and then just track any changes the user might make to the value via your settings screen.

That should allow you to always know the current value, since you’re setting it in each case.

Also, poking around in the source, it looks like the value might default to 0 (so, SHADOW_QUALITY_HARD).

But, as you said, I don’t see a way to get the current value…

jgodfrey | 2023-03-13 22:20