![]() |
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.
|
To be honest I'm not sure if such things can be added anytime soon. We use it for some of our iPhone games but it's not that easy to expose to script. There are however other things in the works which can also improve Graal graphically in the future.
|
Quote:
|
Quote:
Another thing I'd like to see is showimg, minus the layer sorting, depth sorting, and all that. Just draw it directly to the frame buffer as soon as it's called, and forget about it forever once the frame ends; just like blitting an image in SDL or whatever other graphics front. It'd make certain scripts easier to write where you have to manually draw an entire world for, say, an isometric or raycasting script, draw back-to-front, or front-to-back to get certain things looking right, and if I'm not mistaken it'd probably be significantly faster, since the client wouldn't be creating and destroying, sorting depth through tons of image objects. |
Quote:
|
Quote:
|
Stefan, you make it sound as if the current developers are stuck using the same tools as during 2001 and are just waiting for V6 release, there has to have been some new goodies added to make a really fun and beautiful server, Konidias managed to get some very nice graphics in bomy island so i'm very certain similar quality should be available now instead of the much older tilesets that are still in use on Era, UN and Zodiac or many of the hosted and under construction servers.
Combining Koni level work with Gonstruct would make one impressive and very professional looking server. |
Quote:
And Koni's BI didn't really push Graal to its limits. |
Quote:
|
Doesn't Graal have a subtractive blending mode?
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 04:47 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.