Norodix / GodotMirror

A versatile mirror for the godot game engine
MIT License
95 stars 13 forks source link

Linear filtering + Shader dusting #1

Closed Firepal closed 2 years ago

Firepal commented 2 years ago

MirrorMaterial:

MirrorShader:

Firepal commented 2 years ago

forgot to version bump in plugin.cfg, welp

Firepal commented 2 years ago

Very good changes, I really like it.

Np. I will try and do more when I'm off holiday :)

One thing missing is a default distortion texture.

The best would be to export the distortion texture to the top level script to let the user pick one as they see fit. Do you know how that could be done?

Easy. We can make an exported Texture variable, and add a setter function to it that sets the given texture (or if null, the default stored as a .tres) on the shader using ShaderMaterial.set_shader_param(name,value).

Instead of only fixing the missing texture, we could implement that and solve two in one!

Norodix commented 2 years ago

Damn it. I even searched for it but now that you mention I immediately find this type of export variable.