Versions in this module Expand all Collapse all v1 v1.0.0 Feb 21, 2025 Changes in this version + func IsValidSwizzling(s string) bool + func ResolveUntypedConstsForBinaryOp(op Op, lhs, rhs constant.Value, lhst, rhst Type) (newLhs, newRhs constant.Value, ok bool) + type BasicType int + const Array + const Bool + const Float + const IVec2 + const IVec3 + const IVec4 + const Int + const Mat2 + const Mat3 + const Mat4 + const None + const Struct + const Texture + const Vec2 + const Vec3 + const Vec4 + type Block struct + LocalVarIndexOffset int + LocalVars []Type + Stmts []Stmt + type BuiltinFunc string + const Abs + const Acos + const Asin + const Atan + const Atan2 + const BoolF + const Cap + const Ceil + const Clamp + const Cos + const Cross + const Degrees + const Dfdx + const Dfdy + const DiscardF + const Distance + const Dot + const Exp + const Exp2 + const Faceforward + const FloatF + const Floor + const Fract + const Fwidth + const IVec2F + const IVec3F + const IVec4F + const IntF + const Inversesqrt + const Len + const Length + const Log + const Log2 + const Mat2F + const Mat3F + const Mat4F + const Max + const Min + const Mix + const Mod + const Normalize + const Pow + const Radians + const Reflect + const Refract + const Sign + const Sin + const Smoothstep + const Sqrt + const Step + const Tan + const TexelAt + const Transpose + const Vec2F + const Vec3F + const Vec4F + func ParseBuiltinFunc(str string) (BuiltinFunc, bool) + type Expr struct + BuiltinFunc BuiltinFunc + Const constant.Value + Exprs []Expr + Index int + Op Op + Swizzling string + Type ExprType + type ExprType int + const Binary + const Blank + const BuiltinFuncExpr + const Call + const FieldSelector + const FunctionExpr + const Index + const LocalVariable + const NumberExpr + const Selection + const StructMember + const SwizzlingExpr + const TextureVariable + const Unary + const UniformVariable + type FragmentFunc struct + Block *Block + type Func struct + Block *Block + InParams []Type + Index int + OutParams []Type + Return Type + type Op int + const Add + const And + const AndAnd + const ComponentWiseMul + const Div + const EqualOp + const GreaterThanEqualOp + const GreaterThanOp + const LeftShift + const LessThanEqualOp + const LessThanOp + const MatrixMul + const ModOp + const NotEqualOp + const NotOp + const Or + const OrOr + const RightShift + const Sub + const VectorEqualOp + const VectorNotEqualOp + const Xor + func OpFromToken(t token.Token, lhs, rhs Type) (Op, bool) + type Program struct + Attributes []Type + FragmentFunc FragmentFunc + Funcs []Func + SourceHash SourceHash + TextureCount int + UniformNames []string + Uniforms []Type + Unit Unit + Varyings []Type + VertexFunc VertexFunc + func (p *Program) FilterUniformVariables(uniforms []uint32) + func (p *Program) LocalVariableType(topBlock, block *Block, idx int) Type + func (p *Program) ReachableFuncsFromBlock(block *Block) []*Func + type SourceHash [16]byte + func CalcSourceHash(source []byte) SourceHash + func (s SourceHash) String() string + type Stmt struct + Blocks []*Block + Exprs []Expr + ForDelta constant.Value + ForEnd constant.Value + ForInit constant.Value + ForOp Op + ForVarIndex int + ForVarType Type + InitIndex int + Type StmtType + type StmtType int + const Assign + const BlockStmt + const Break + const Continue + const Discard + const ExprStmt + const For + const If + const Init + const Return + type Type struct + Length int + Main BasicType + Sub []Type + func TypeFromBinaryOp(op Op, lhst, rhst Type, lhsConst, rhsConst constant.Value) (Type, bool) + func (t Type) DwordCount() int + func (t Type) Equal(rhs *Type) bool + func (t Type) IsFloatVector() bool + func (t Type) IsIntVector() bool + func (t Type) IsMatrix() bool + func (t Type) MatrixSize() int + func (t Type) String() string + func (t Type) VectorElementCount() int + type Unit int + const Pixels + const Texels + type VertexFunc struct + Block *Block