ebiten: Rename builtin shader functions

* textureDstSize -> imageDstTextureSize
 * texture[N]Size -> image[N]TextureSize
 * texture[N]At -> image[N]TextureAt

Updates #1287
This commit is contained in:
Hajime Hoshi
2020-08-11 02:07:50 +09:00
parent 3893f9cdbe
commit 68ca0c634e
9 changed files with 20 additions and 20 deletions

View File

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