mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-06 08:27:17 +08:00
ebiten: Rename shader builtin functions
* imageSrcTextureSourceRegion -> imageSrcTextureRegion * image[N]TextureAt -> imageSrc[N]At * image[N]TextureBoundsAt -> imageSrc[N]BoundsAt Updates #1325
This commit is contained in:
@@ -23,13 +23,13 @@ var ScreenImage vec2
|
||||
func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
|
||||
// Triangle wave to go 0-->1-->0...
|
||||
limit := abs(2*fract(Time/3) - 1)
|
||||
level := image3TextureAt(texCoord).x
|
||||
level := imageSrc3At(texCoord).x
|
||||
|
||||
// Add a white border
|
||||
if limit-0.1 < level && level < limit {
|
||||
alpha := image0TextureAt(texCoord).w
|
||||
alpha := imageSrc0At(texCoord).w
|
||||
return vec4(alpha)
|
||||
}
|
||||
|
||||
return step(limit, level) * image0TextureAt(texCoord)
|
||||
return step(limit, level) * imageSrc0At(texCoord)
|
||||
}
|
||||
|
Reference in New Issue
Block a user