gpu: update gioui.org/shader for portable materials.vert shader

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-08-20 10:47:44 +02:00
parent 04cc616e1f
commit 13b93b27d8
4 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -893,9 +893,10 @@ restart:
m.cpuTex = cpu.NewImageRGBA(texSize, texSize)
}
}
// Transform to clip space: [-1, -1] - [1, 1].
g.materials.vert.uniforms.scale = [2]float32{2 / float32(texSize), 2 / float32(texSize)}
g.materials.vert.uniforms.pos = [2]float32{-1, -1}
// Transform to clip space: [-1, -1] - [1, 1] and flip Y-axis to cancel the implied transformation
// between framebuffer and texture space.
g.materials.vert.uniforms.scale = [2]float32{2 / float32(texSize), -2 / float32(texSize)}
g.materials.vert.uniforms.pos = [2]float32{-1, +1}
g.materials.vert.buf.Upload(byteslice.Struct(g.materials.vert.uniforms))
vertexData := byteslice.Slice(m.quads)
n := pow2Ceil(len(vertexData))
+1 -1
View File
@@ -135,7 +135,7 @@ type imageOp struct {
// shaderModuleVersion is the exact version of gioui.org/shader expected by
// this package. Shader programs are not backwards or forwards compatible.
const shaderModuleVersion = "v0.0.0-20210816161847-c12352edbd45"
const shaderModuleVersion = "v0.0.0-20210820085839-484f7c0305de"
func decodeStrokeOp(data []byte) clip.StrokeStyle {
_ = data[4]