Skip to content

Commit f1e4dbd

Browse files
committed
Reduce ambiguity
1 parent fdb41fc commit f1e4dbd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/GateEngine/ECS/3D Specific/MaterialComponent.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ public final class MaterialComponent: ResourceConstrainedComponent {
1919
self.resourcesState = .pending
2020
}
2121
}
22-
22+
23+
// TODO: Remove abiguity
24+
// The type of value is used when building a shader. If an int literal is used and a float is needed the shader will not behave properly
25+
// Remove generic overloads and replace them with verbose named functions such as the "asFloat" below
2326
public func setCustomUniformValue(_ value: some CustomUniformType, forUniform name: String) {
2427
material.setCustomUniformValue(value, forUniform: name)
2528
}
26-
@_disfavoredOverload
27-
public func setCustomUniformValue(_ value: Float, forUniform name: String) {
29+
30+
public func setCustomUniformValue(asFloat value: Float, forUniform name: String) {
2831
material.setCustomUniformValue(value, forUniform: name)
2932
}
3033

0 commit comments

Comments
 (0)