https://linen.dev logo
Join Discord
Powered by
# ceramic
  • g

    gifted-whale-78169

    02/05/2023, 1:16 AM
    also just made a quesadilla and damn its good
  • g

    gifted-whale-78169

    02/05/2023, 1:16 AM
    cheese and beans
  • g

    gifted-whale-78169

    02/05/2023, 2:46 AM
    first part of the tutorial is up: https://kevspau.github.io/blog/flappybird/introduction.html
  • g

    gifted-whale-78169

    02/05/2023, 2:46 AM
    nothing much, mainly just installing ceramic and making a project
  • b

    billowy-waiter-28954

    02/05/2023, 11:48 AM
    That's nice, but the installation is missing the
    haxelib run ceramic setup
    part (check the guide on ceramic website: https://ceramic-engine.com/guides/install-ceramic/)
  • g

    gifted-whale-78169

    02/05/2023, 2:48 PM
    oh snap my bad, ill fix it
  • g

    gifted-whale-78169

    02/05/2023, 2:58 PM
    there
  • g

    gifted-whale-78169

    02/05/2023, 4:43 PM
    messing around with clipping
  • g

    gifted-whale-78169

    02/05/2023, 4:43 PM
    notice how its still visible outside of the clip, just darkened
  • b

    billowy-waiter-28954

    02/05/2023, 5:17 PM
    Displaying the same texture 2 times, one darkened, the other one clipped right?
  • g

    gifted-whale-78169

    02/05/2023, 8:53 PM
    bingo
  • g

    gifted-whale-78169

    02/05/2023, 8:53 PM
    to make it darkened i actually just have a black quad with alpha at something like 9.2
  • g

    gifted-whale-78169

    02/05/2023, 9:07 PM
    that would be cool if there was inverse clipping
  • g

    gifted-whale-78169

    02/05/2023, 9:08 PM
    so i wouldnt need a copy of the texture, i can just make the black quad appear everywhere except for in the arc
  • b

    billowy-waiter-28954

    02/05/2023, 9:15 PM
    having 2 quads with the same texture is not really an issue so far
  • b

    billowy-waiter-28954

    02/05/2023, 9:15 PM
    If you want to invert the clipping, you need to use an... inverted mesh as clipping visual
  • b

    billowy-waiter-28954

    02/05/2023, 9:15 PM
    But yeah I don't have any utility in Ceramic to do that
  • f

    faint-toothbrush-51643

    02/05/2023, 9:33 PM
    couldn't you just put a shader on the black quad
  • f

    faint-toothbrush-51643

    02/05/2023, 9:35 PM
    you could pass in the x, y, and radius of the spotlight as uniforms and compute the distance between the pixel and the center
  • f

    faint-toothbrush-51643

    02/05/2023, 9:35 PM
    heck, it would probably be better because you could make the edges fade in instead of being sharp
  • b

    billowy-waiter-28954

    02/05/2023, 9:35 PM
    Sounds like a more complicated option, that in addition will break batching because using a different shader
  • f

    faint-toothbrush-51643

    02/05/2023, 9:35 PM
    break batching?
  • f

    faint-toothbrush-51643

    02/05/2023, 9:36 PM
    but you wouldn't need to be displaying the back stuff twice
  • b

    billowy-waiter-28954

    02/05/2023, 9:42 PM
    Breaking a draw batch will add draw calls, and adding draw calls can be much more expensive than drawing twice the texture, unless you are running the app on a device with very limited fill rate
  • b

    billowy-waiter-28954

    02/05/2023, 9:42 PM
    (This is true mostly on web and mobile)
  • b

    billowy-waiter-28954

    02/05/2023, 9:43 PM
    But well, silly me, clipping is also breaking the batch anyway
  • f

    faint-toothbrush-51643

    02/05/2023, 9:49 PM
    i mean, the comparison is between - two of the background texture and a black quad - one of the background texture and a black quad
  • f

    faint-toothbrush-51643

    02/05/2023, 9:51 PM
    also, if you want to have a darkness and spotlight effect on something other than a single static image, i'm sure the shadered black would work out much better than trying to duplicate everything
  • b

    billowy-waiter-28954

    02/05/2023, 9:52 PM
    Clipping does work on all children of the visual it is applied to
  • b

    billowy-waiter-28954

    02/05/2023, 9:53 PM
    Sure, but to be fair, this won’t really make a difference in practice in most situations
1...585960...124Latest