ios - Using an array technique for manipulating individual pixels on screen -
a programmer told me used array technique manipulating individual pixels on screen attain specific in (java?) game. outcome: http://awkwardknight.com/staygame/gifs/day-night_cycle3.gif
that exact same thing trying get: 'lightsource' (or general area) nullifies tinted layer around make seem light illuminating vicinity. programmers exact words: "the way caelis renders uses pixel array representing each pixel on screen , using function, can iterate , darken/lighten whatever want."
i can't understand how this. i've never done this. right have 'skshapenode' serving tint layer alpha varying on time of day (which 'nsdate'). can't change individual pixel alphas.
can please explain how write such function? maybe example code? appreciated since don't know how write custom shader either u_u
manipulating every single pixel (or point) on screen sounds extremely inefficient way of doing things.
to achieve day/night effect in animation, suggest create 2 or more layers. 1 day, 1 night , perhaps 1 transition. place each in view different zpositions. transition 1 "ambiance" another, use timed alpha fade in new , fade out old.
Comments
Post a Comment