mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-11-01 12:12:41 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user