mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +01:00
parent
aecd29325e
commit
202bb34bac
@ -248,6 +248,9 @@ const (
|
|||||||
All BuiltinFunc = "all"
|
All BuiltinFunc = "all"
|
||||||
Not BuiltinFunc = "not"
|
Not BuiltinFunc = "not"
|
||||||
Texture2DF BuiltinFunc = "texture2D"
|
Texture2DF BuiltinFunc = "texture2D"
|
||||||
|
Dfdx BuiltinFunc = "dfdx"
|
||||||
|
Dfdy BuiltinFunc = "dfdy"
|
||||||
|
Fwidth BuiltinFunc = "fwidth"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ParseBuiltinFunc(str string) (BuiltinFunc, bool) {
|
func ParseBuiltinFunc(str string) (BuiltinFunc, bool) {
|
||||||
@ -302,7 +305,10 @@ func ParseBuiltinFunc(str string) (BuiltinFunc, bool) {
|
|||||||
Any,
|
Any,
|
||||||
All,
|
All,
|
||||||
Not,
|
Not,
|
||||||
Texture2DF:
|
Texture2DF,
|
||||||
|
Dfdx,
|
||||||
|
Dfdy,
|
||||||
|
Fwidth:
|
||||||
return BuiltinFunc(str), true
|
return BuiltinFunc(str), true
|
||||||
}
|
}
|
||||||
return "", false
|
return "", false
|
||||||
@ -320,6 +326,10 @@ func (f BuiltinFunc) Glsl() string {
|
|||||||
return "greaterThanEqual"
|
return "greaterThanEqual"
|
||||||
case NotEqual:
|
case NotEqual:
|
||||||
return "notEqual"
|
return "notEqual"
|
||||||
|
case Dfdx:
|
||||||
|
return "dFdx"
|
||||||
|
case Dfdy:
|
||||||
|
return "dFdy"
|
||||||
default:
|
default:
|
||||||
return string(f)
|
return string(f)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user