mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
853c1f2b92
Some built-in functions like dFdx is not available in a vertex shader, then a function that calls such built-in function should not be in a vertex shader. Closes #1701
36 lines
280 B
Go
36 lines
280 B
Go
package main
|
|
|
|
func Foo() {
|
|
Bar()
|
|
Baz()
|
|
}
|
|
|
|
func Bar() {
|
|
Baz()
|
|
Quux()
|
|
}
|
|
|
|
func Baz() {
|
|
}
|
|
|
|
func Quux() {
|
|
Baz()
|
|
}
|
|
|
|
func NeverCalled() {
|
|
Foo()
|
|
Bar()
|
|
Baz()
|
|
Quux()
|
|
}
|
|
|
|
func Vertex(pos vec2) vec4 {
|
|
Foo()
|
|
return vec4(0)
|
|
}
|
|
|
|
func Fragment(pos vec4) vec4 {
|
|
Quux()
|
|
return vec4(0)
|
|
}
|