treeform / shady

Nim to GPU shader language compiler and supporting utilities.
MIT License
153 stars 12 forks source link

Uniform type is non-convertable with Nim-2.2.0 #21

Open ehmry opened 1 month ago

ehmry commented 1 month ago

When building with the Nim-2.2.0 release the Uniform[T] types are not being implicitly converted to T.

examples/triangle.nim(17, 21) Error: type mismatch
Expression: MVP * vec4(vPos.arr[0], vPos.arr[1], 0.0, 1.0)
  [1] MVP: Uniform[vmath.Mat4]
  [2] vec4(vPos.arr[0], vPos.arr[1], 0.0, 1.0): Vec4

Expected one of (first mismatch at [position]):
[1] proc `*`[T](a: GMat4[T]; b: GVec4[T]): GVec4[T]

https://github.com/NixOS/nixpkgs/issues/350913

treeform commented 3 weeks ago

I need to look into this. I think I ran into this as well will probably have a fix soon.

treeform commented 2 weeks ago

https://github.com/nim-lang/Nim/issues/24415