Kode / Kinc

Modern low level game library and hardware abstraction.
http://kinc.tech
zlib License
517 stars 119 forks source link

Uniform name "bias" compiles to metal shader as "bias0" #806

Closed posxposy closed 10 months ago

posxposy commented 1 year ago

Describe the bug Looks like the bias name is already reserved by some standard metal function so uniforms with that name is compiled to metal with bias0 name and as a result pipeline.getConstantLocation("bias") can't find a uniform.

To Reproduce Just add a uniform float bias; to any shader and compile it to metal.

Expected behavior Probably pipeline.getConstantLocation should handle that case, or provide a warning at least.

Execution Environment: