depends on how exact you want it, but you could get the bounding 2d from the bounding 3d, if your windowing functions, if the window costs more than the function itself whats the point in it.
I don’t want you spending all your spare time on the framework, rather see some pretty pictures.
However, having said that ……. ;>
I am just wondering if it could be possible to have passes flagged as “run once”
What I am thinking is….
image1.fs run once generates water texture
image2.fs run once generates grass texture
image3.fs run once generates rock texture
image4.fs textured landscape shader
Basically Reed describes the method we’ve used for marking some parts of scene with slight difference, don’t use anchor points or all vertices, project bounding volume (we use AABBs … in case of planes you would probably like to use bounding sphere around them) that is around your model ~ projecting those 8 points is a nothing (if it hurts your performance, you can always do that in CUDA, if you for some reason need all the CPU power).
I see what you mean, makes sense.
Is there a more complex/faster method of doing this as well? How do they do it in commercial games?
It’s a 2D rectangle around the model on screen that you want? The simplest thing might be to loop over all the vertices and project them to screen space (using the same matrices that you use for rendering), then find the 2D bounding rect of the screen-space verts.
That’s probably too expensive though, so you could consider manually placing a few anchor points, like at the nose, tail, and ends of the wings, and just projecting those. That would be much faster than using every vertex in the model.
You’ll have to watch out for what happens when the plane gets too close to the camera, as the rectangle will get big (and even infinite, if one of the projected points goes behind the camera). It might be wise to impose a maximum size for the rect, or something like that.
My bad. I forgot to make the update. I just added in the changes and updated the notes at the top.
I totally second this, because just today I read that all new topics are commercial ads. This leads me to - is someone in contact with Dia, I guess he is working on update -> when can we expect it? :)
Well I guess we’ll get some update from Nutty soon, that will allow us to read from M previous passes … then the fun will begin.
And I finally started working on something to add here :P
I tried using a much, much simper height equation.
Don’t really like it, but interesting to see what you can do without textures
Interesting. I would suspect the fbm is causing most of the problems. At 6 iterations, it’s pretty expensive, plus being nested in another loop. Have you tried for something more like rolling hills? You could skip the fbm and just use the noise value directly. With the savings, you can calculate a normal vector and use real lighting equations. Could be interesting.
I’m going to update the framework when I get home from work tonight. As Vilem suggested, I’m going to store a record of textures (up to 4, maybe 8) as you progress down the number of passes. I’m also going to add normalized mouse coordinates if you want to make your shaders respond to mouse movements. Let me know if there’s anything else you think would be nice to have.
Started to do ray traced terrain, but if I add anything else to the shader it crashes
I guess I’ve run out of registers
The animation is really subtle, but effective. Like it
New review from Touch Arcade:
“The developers really did a good job of making the castle memorable, to the point where I’d want to see it again in a future release.” - 4.0/5.0 - Touch Arcade
I added a new one I dub the Voodoobrot. It’s basically Mandelbrot on THC :)
This is a short video showcasing the integrated context sensitive HTML help. It turned out the be a little more bothersome to get working than I anticipated. Now I just have to finish working on the documentation.
Just get the file in shaders folder:
It should be available from any domain.
could you share your ray creation for pixel code please?
I’ve tried several and none worked as I wanted.
No load it, might give someone an idea
All it does is use the second pass to rotate the bitmap generated in the first pass, but you could use a warp or something using the same technique
Bwhahaha… found a bit of time today, so I can start catching you. For start, a simple ray tracer … although it’ll get more serious really really soon (would like to do some epic geometry and procedural texturing).
This one is single-pass only. Just spheres, reflections, shadows and stuff.
By the way, is there a possibility to read textures from N-1 previous passes (that could help me a bit, but if not I guess I’ll have to live with limitations).
merry christmas, music module player only with Chrome
I was thinking something more like this. It would be nice to put a satellite or space station in there to add context, but save that for another place and time.
Did you want me to post your second one or are you still working on it?
Tried a two pass version of Orbit, didn’t work out as well as I hoped though
Just for anyone looking for the demos
Did you see any other important details? It doesn’t sound like a cross-domain issue, otherwise you would see the white screen Stainless saw (although I am surprised Chrome required that special attribute). Perhaps the Opera JS engine is failing on something I’m doing?
BTW, Firefox has a static build for Linux, so it should be a simple extract + run ./firefox.
I still can’t run even Nutty’s example - got everything placed on localhost, and Opera still screams ‘Unhandled Error: Undefined variable: MainScene’, plus Linked script not loaded (in console). I know this is sometimes caused by disallowing cross origin request (while I have them enabled)… any hint?
EDIT: Somewhere read that this is a common bug with Opera, although I can’t really use different browser by now (I’m limited to Linux OS here, and installing FF on this distro would be bloody mess), so I guess it has to wait till I get to desktop.