Open ghost opened 2 years ago
Sun Disk Scale multiplies the DirectionalLight3D's Angular Distance property. By default, this is 0 for performance reasons (as rendering PCSS shadows is expensive).
I suppose Sun Disk Scale should be replaced with Sun Disk Size Offset instead, which would add/subtract to the light's size. This way, you can use a non-zero light size even if the light's actual angular distance is 0.
If someone is going to change the sun algorithm, would it be possible to make it much brighter without increasing the light source's energy? Looks a bit dull for a sun IMO
@JohanAR Increasing the DirectionalLight3D's angular distance should make the sun more visible as I mentioned. If you don't want to increase its angular distance for performance reasons, you could alter the actual sun disk size right now using a custom sky shader (by creating a custom shader from the current sky shader using the Convert to ShaderMaterial resource dropdown option).
@Calinou I converted it to a shadermaterial, and changed sun disc scale to sun disc offset like you previously suggested. But I think the resulting sun looks a bit too gray, even when high up in the sky. Using the colour picker I get the value #eeebe2. So in my custom shader I multiplied L0 with 5.0 to make it brighter
cc @clayjohn
Please ignore my commit above, it does not contain any code useful here! This was automatically generated by Github from a temporary commit in my repository. I will implement another shader with modifiable clouds, moon, stars as I used in Godot 3.5 before.
Godot version
4.0 beta 1
System information
Windows 11
Issue description
PhysicalSkyMaterial doesn't have a sun disk. So the sun disk scale property doesn't affect anything.
Workaround: Convert PhysicalSkyMaterial to shader material. Replace LIGHT0_SIZE constant with 0.1
My guess is something with the LIGHT0_SIZE.
Steps to reproduce
Minimal reproduction project
Sun.zip