3 rt and 1 fire shader(HLSL)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

roxaz wrote:this requieres pixel shaders right?
Yes :D

Most of them need PS 2.0 except for the distortion which appearsto be PS 1.4 (1.4 is commonly found on the Radeon 9200)
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

if you calculate all your offsets in the vertex shader and send them via texcoords(each texcoord layer has 4 floats so thats allot of data you can send) you are no longer using whats called dependent texture reads which are slow and limited on pre 2.a hw (especially ati hw). The dependent tex reads are textures with texcoords made in the pixel shader.

however if you are using a texture to create the offsets then you can't do that so try and limit the dependent tex reads to < 4.

if you do that you can lower your shader model.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

belfegor wrote:Not sure what you mean.
I ment hardware support
BlindSide wrote:
roxaz wrote:this requieres pixel shaders right?
Yes :D

Most of them need PS 2.0 except for the distortion which appearsto be PS 1.4 (1.4 is commonly found on the Radeon 9200)
bad... sorry for little offtopic but could someone tell me what can i make with vertex shaders and with pixel shaders? I basicly know what can i make, but i want to know capabilities of vertex shaders only, and pixel shaders only. You see, my video card does not support pixel shaders so i want to know what limits are for me there in graphics.. :)
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Ok, i will try to calculate ofssets in vertex shader and send them via texcoords to pixel shader as omaremad proposed
and see if it can work below ps 2.0.It should be simple so you can try it yourself.If i get it to work ill post update here.

roxaz
What gfx card do you have?If you can, consider buying new gfx card?
I have AGP NVidia 6200 its preaty cheap, costs me about 50 euro's.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
BMF
Posts: 62
Joined: Mon Jul 16, 2007 11:10 am
Location: Spain
Contact:

Post by BMF »

Seems to apply the blur effect even to stuff that's not moving, can that be fixed?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

No it cannot be "fixed" because its not a problem to begin with. This is gaussian and radial blur not Motion Blur.
roxaz wrote: bad... sorry for little offtopic but could someone tell me what can i make with vertex shaders and with pixel shaders? I basicly know what can i make, but i want to know capabilities of vertex shaders only, and pixel shaders only. You see, my video card does not support pixel shaders so i want to know what limits are for me there in graphics.. :)
You can do some pretty cool things, like manipulate vertices. Here is an example of a vertex shader in action (Ignore shinniness on material that is done by pixel shader):

Image
See it is simple I just run a sin function on the vertices set to a time constant and the mesh wiggles about. You can also implement hardware skinning on vertex shader alone. Basically anything to manipulate vertices (Including the vertex colour).
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BMF
Posts: 62
Joined: Mon Jul 16, 2007 11:10 am
Location: Spain
Contact:

Post by BMF »

Excuse me? On page two of this topic you'll find he made a conversion of TGM's motion blur to work with Direct3D. That's the motion blur I'm talking about. :o
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

BMF wrote:Seems to apply the blur effect even to stuff that's not moving, can that be fixed?
No, this code can't do what you whant. It blurs all stuff in view.
I think you need more like this:

http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2179
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Do you think this code could do the same as SIO2 demo (Motion blur)?

I would like to have a way to do the same as in SIO2 Motion Blur demo (Was exactly the way I want and it's fast).
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

Hi, Do you think this code could do the same as SIO2 demo (Motion blur)?
Dont know. Didn't tried that demo.

I would not use this one for moving object motion trail.
Instead i could use it for example when player is hit (damaged).
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

I just tried Belfegor's Motion Blur code from page 2 with Irrlicht 1.3.1. It seemed to work OK with a few nudges. The major difference with my version is that I use floating-point render targets.

With Irrlicht 1.3.1 I couldn't use 800x600 as the rendertarget size - I had to reduce it to 512x512, with the resultant stretch to 800x600. I got around 2000fps on an 8800 but enabling vsync gives a bit more control over the blur strength since it isn't being adjusted based on frame rate (as I do in my own demo). Another difference is that I have the option to use MRT to remove one of the passes.
Post Reply