bayer-dithering shader revisited

This commit is contained in:
minjaesong
2017-07-15 18:35:57 +09:00
parent 1f0608b768
commit 9f56ca2e99
4 changed files with 54 additions and 49 deletions

View File

@@ -23,6 +23,13 @@ class Float16() {
bits = Float16.fromFloat(fval)
}
operator fun times(other: Float) = fromFloat(this.toFloat() * other)
operator fun times(other: Float16) = fromFloat(this.toFloat() * other.toFloat())
operator fun div(other: Float) = fromFloat(this.toFloat() / other)
operator fun div(other: Float16) = fromFloat(this.toFloat() / other.toFloat())
// operators are stripped: you don't calculate from FP16; this is only for storing values //
companion object {