Skip to content

Commit

Permalink
Misc. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Jul 3, 2023
1 parent f91523f commit 0245c20
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions addons/material_maker/engine/gen_base.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class InputPort:
var generator : MMGenBase = null
var input_index : int = 0

func _init(g : MMGenBase, i : int):
func _init(g : MMGenBase, i : int) -> void:
generator = g
input_index = i

Expand All @@ -33,12 +33,12 @@ class ShaderUniform:
var type : String
var value

func _init(n : String, t : String, v):
func _init(n : String, t : String, v) -> void:
name = n
type = t
value = v

func to_str(keyword : String = "uniform"):
func to_str(keyword : String = "uniform") -> String:
var str_value_assign : String = ""
match type:
"float":
Expand Down
2 changes: 1 addition & 1 deletion addons/material_maker/engine/gen_iterate_buffer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func get_output_attributes(output_index : int) -> Dictionary:
1:
attributes.texture = "%s_loop_tex" % genname
attributes.texture_size = "%s_tex_size" % genname
attributes.iteration = "%s_iteration" % genname
attributes.iteration = iteration_param_name
return attributes

func _serialize(data: Dictionary) -> Dictionary:
Expand Down
3 changes: 1 addition & 2 deletions addons/material_maker/engine/multi_renderer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ func release(renderer : Object) -> void:
free_renderers.append(renderer)
free_renderer.emit()


func request_rendering_device(user) -> RenderingDevice:
while !renderers_enabled or rendering_device_user != null:
while ! renderers_enabled or rendering_device_user != null:
await self.free_rendering_device
rendering_device_user = user
return rendering_device
Expand Down
4 changes: 4 additions & 0 deletions addons/material_maker/shader_functions.tres
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ vec3 hsv2rgb(vec3 c) {
float param_rnd(float minimum, float maximum, float seed) {
return minimum+(maximum-minimum)*rand(vec2(seed));
}
float param_rndi(float minimum, float maximum, float seed) {
return floor(param_rnd(minimum, maximum + 1.0, seed));
}
"

0 comments on commit 0245c20

Please sign in to comment.