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:
Hajime Hoshi
2020-09-01 21:28:08 +09:00
parent 20a01ed328
commit dd7b0d81ae
11 changed files with 22 additions and 22 deletions

View File

@@ -23,8 +23,8 @@ var ScreenSize vec2
func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
lightpos := vec3(Cursor, 50)
lightdir := normalize(lightpos - position.xyz)
normal := normalize(image1TextureAt(texCoord) - 0.5)
normal := normalize(imageSrc1At(texCoord) - 0.5)
ambient := 0.25
diffuse := 0.75 * max(0.0, dot(normal.xyz, lightdir))
return image0TextureAt(texCoord) * (ambient + diffuse)
return imageSrc0At(texCoord) * (ambient + diffuse)
}