mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-10-29 10:52:38 +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,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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user