Hmm, there’s a few questions that require long answers in this thread…
Render Predicate - This just means a group of things that get rendered together. If you open a material file, at the bottom it will have a tag set. Sprites and things have the “tile” tag, gui has the “gui” tag, etc.
In your render script init() you will see this:
self.tile_pred = render.predicate({"tile"})
…which defines a predicate of all things with a material with the “tile” tag. When you want to draw that stuff, in your render script, you do:
render.draw(self.tile_pred)
Drawing GUI in persective
Yeah, theoretically you could just move render.draw(self.gui_pred)
up to where sprites are drawn (next to render.draw(self.tile_pred)
), in your render script. I’ve never actually tried it though, so it may mess up. GUI nodes ignore their Z position…I’m not sure how that would work with a perspective camera. I would suggest using game objects and sprites or models instead, unless there’s a reason why you must use GUI. If all you’ll ever need is the book cover, faking it with two triangles is a good idea.
"Flipping" 0-1
(1 - x)
is the function you’re looking for.
1 - 1 = 0
1 - 0 = 1
…
1 - 0.5 = 0.5
1 - 0.25 = 0.75
1 - 0.75 = 0.25, etc.