![]() |
Stencil buffer.
Why can't we touch the stencil buffer in GS2? :(
I wanted to do reflection effects for players in water, among many other things.. |
This can probably be interesting but could you explain a little bit more what you want to do and how?
|
You would enable writing to the stencil buffer by doing a generic function, like
graphicsEnable(STENCIL_BUFFER); then, you would, in most cases, clear the stencil buffer before you start using it. graphicsClear(STENCIL_BUFFER); Following, since you're in stencil mode, any showimgs, anything that would normally be drawn to the draw buffer is now drawn to the stencil buffer. You set an operation using setStencilOp(STENCILOP); and could choose from the following operations: NPC Code:STENCILOP_KEEP Finally, after creating a proper stencil buffer, you could then test against it when drawing images: stencilTestFunc(STENCILTEST); NPC Code:STENCILTEST_NEVER Setting a reference value could just be something like stencilSetReference(int); Could be used for tons of stuff.. Parallax scrolling backgrounds, reflections of sky images in water, reflections of players in water.. Tons of very interesting uses if it's put to good use. If you've ever used the stencil buffer in an OpenGL application, you'd be familiar with how to use it and you'd see a bunch of potentional, too :D |
Not to mention this could be used to clip images against bounding boxes, for minigames and such.. I really ****ing need that, especially since clipping showpolys is slow compared to taking advantage of the stencil buffer.
|
Bump. :D
|
This sounds interesting, should do something with it.
|
1 Attachment(s)
u cud use it to fulfil my dream~
|
Quote:
Graal needs way more special effects. It can add so much atmosphere! |
Quote:
|
Stencil buffer plz <3
Also, render-to-texture support while we're at it! If I'm not mistaken in the technique you use for certain GUIControls, it's nothing more than adapting your GUIDrawingPanel's. |
I guessing this would be more efficient than having an extra image/NPC, rotating it, and lowering the alpha?
|
Quote:
|
Quote:
|
So graal will go from basically Zelda 3 with upgrades to to pretty much the four sword adventures? Effects wise. I vote yes.
|
Would be nice if graal could compete with other 1-man team indie games someday.
|
| All times are GMT +2. The time now is 06:17 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.