mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu: update gioui.org/shader for portable materials.vert shader
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -10,5 +10,5 @@ require (
|
||||
|
||||
require (
|
||||
gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2
|
||||
gioui.org/shader v0.0.0-20210816161847-c12352edbd45
|
||||
gioui.org/shader v0.0.0-20210820085839-484f7c0305de
|
||||
)
|
||||
|
||||
@@ -4,8 +4,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7
|
||||
gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ=
|
||||
gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2 h1:AGDDxsJE1RpcXTAxPG2B4jrwVUJGFDjINIPi1jtO6pc=
|
||||
gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ=
|
||||
gioui.org/shader v0.0.0-20210816161847-c12352edbd45 h1:tWCgnOK33iYKNvQ4ctNHBknZ6r273Na82wcTOFc29ZM=
|
||||
gioui.org/shader v0.0.0-20210816161847-c12352edbd45/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM=
|
||||
gioui.org/shader v0.0.0-20210820085839-484f7c0305de h1:fkcZh0i9T0SzMlqiDm2GBVqXZsbX6bevHcJHfR0llcg=
|
||||
gioui.org/shader v0.0.0-20210820085839-484f7c0305de/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
|
||||
+4
-3
@@ -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
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user