Closed MJacred closed 4 years ago
This is great, but I think this might've broken compatibility with my plugin.
As far as I understand, only two lines are responsible for the connection with the plugin. const IS_LEX_SKY = true and func _enter_tree(): add_to_group("__LEX_SKY__")
I have to clean up some duplicate things in the shaders.
SIsilicon, very big thanks, we take good picture!)) MJacred, Don't rush, first the smooth integration of god rays.
That's the thing though. I removed that second one because it wasn't working out. Which is why I went for a constant instead. The README also doesn't inform about how you should use the zip file.
If I'm not mistaking, aren't you supposed you extract it, then use as a template for your project? Because if the files in that zip aren't in the root project, it won't work. Godot froze a couple of times because of invalid resource references in the Sky
scene.
I fix readme tomorrow. The next task is to display the moon as a texture so that it doesn't stretch across the panorama. I'm not ready to solve it yet. I think we should somehow project the moon on the screen. Tomorrow I'll clean it up a bit and write instructions in the readme where to download and how to add Your plugin to project. I did not expect such attention to this project at all, so I did not think much about readme and other things)) Zip file temporary solution due to incompatibility with 3.1.2
I thought the stretching was just caused by the FOV. I never actually noticed that. :P
Maybe I will look At your code and make a check on Your addon from my side? Not to trash Your addon with constants "Lex_Sky"
if get_parent().get("IS_LEX_SKY"): light = get_parent().get_node("Sun_Moon") set_clouds(get_parent().get_node("cloud_viewport").get_texture())
Yeah. That's checking for the constant alright.
Sow i can call GodRays.light and etc.
Yeah it can be overridden by another script. It changes value whenever it get's parented or unparented.
func _notification(what : int) -> void:
if what == NOTIFICATION_PARENTED:
if get_parent() is Light:
light = get_parent()
if get_parent().get("IS_LEX_SKY"):
light = get_parent().get_node("Sun_Moon")
set_clouds(get_parent().get_node("cloud_viewport").get_texture())
else:
set_clouds(null)
elif what == NOTIFICATION_UNPARENTED:
light = null
set_clouds(null)
I want to add god_rays as an option, becouse performance... like 2d clouds.
It's already optional. Just hide the GodRays node. It won't render at all like that.
This cool!
I like that this effect works not only on clouds, but also comprehensively on Meshs.
That's because it uses the depth buffer as a mask. Which is also why I haven't figured out how to downsample it for a performance boost.
This kind of thing, when you need to use vertex shaders or project something, baffles me. I can't adapt anything to it then.. I'm not far from drawing circles on shadertoy))
I think we can try replace float rand_from_seed() with texture noise...
I think we can try replace float rand_from_seed() with texture noise...
That is definitely doable. I was just too lazy to get a noise texture :P
But this in not loops... I didn't notice right away.
Huh? I'm sorry I don't understand what you're saying.
float rand_from_seed() not used in loops, this used once, unfortunately. There won't be much effect.
That's the thing though. I removed that second one because it wasn't working out. Which is why I went for a constant instead. The README also doesn't inform about how you should use the zip file.
If I'm not mistaking, aren't you supposed you extract it, then use as a template for your project? Because if the files in that zip aren't in the root project, it won't work. Godot froze a couple of times because of invalid resource references in the
Sky
scene.
The explanation is indeed ultra-short. So far it's only sufficient for programmers and people with some experience in Godot, I guess...
I'll make another pull-request with suggested changes. We can discuss there before merging
That's the thing though. I removed that second one because it wasn't working out. Which is why I went for a constant instead. The README also doesn't inform about how you should use the zip file. If I'm not mistaking, aren't you supposed you extract it, then use as a template for your project? Because if the files in that zip aren't in the root project, it won't work. Godot froze a couple of times because of invalid resource references in the
Sky
scene.The explanation is indeed ultra-short. So far it's only sufficient for programmers and people with some experience in Godot, I guess... I'll make another pull-request with suggested changes. We can discuss there before merging
Sounds good to me.
float rand_from_seed() not used in loops, this used once, unfortunately.
Oh that? Yeah the random value is picked once per pixel. It's used as an offset to sample the depth and cloud textures. That's how the dithering works.
added to README
fixed spelling in button text
renamed zip file for actual targeted Godot version -> 3.1.*