per-pixel attenuation
search the forums here, you find pretty much everything about it, vincoof posted some great code once, I'm using a part of it :).
www.prsoftware.de
L0rdDiabl0: If you use fragment programs you can do attenuation in them also. And it's so much simpler to, compared to RC/TexEnv/.. Either calculate it using math or access another 3D falloff texture.
You should never let your fears become the boundaries of your dreams.
Thanks for the response _DarkWIng_
So you suggest that i start learning ARB_Fragment_Program and skip the traditional ways of coding?
Any good learning resources of ARB_Fragment_Program?
So you suggest that i start learning ARB_Fragment_Program and skip the traditional ways of coding?
Any good learning resources of ARB_Fragment_Program?
Quote: Original post by JazzD
search the forums here, you find pretty much everything about it, vincoof posted some great code once, I'm using a part of it :).
I found it
I'll look into into it
I'm not saying to skip it. It depends on what HW you want your program to run on. If you target older HW then you will need to learn how it works on TexEnv. If you target GF-FX and above then you can skip it. And if you target this hight you might as well skip FP and go straight to GLSL (or some other high-level shading language).
But that is just implementation. The actual math, the concepts, the theory, all the things that are really important are the same in all cases. I sugest you to read all you find about it. Even if you don't need to implement it, it may still give you some more info you might need later on.
But that is just implementation. The actual math, the concepts, the theory, all the things that are really important are the same in all cases. I sugest you to read all you find about it. Even if you don't need to implement it, it may still give you some more info you might need later on.
You should never let your fears become the boundaries of your dreams.
Quote: Original post by _DarkWIng_
I'm not saying to skip it. It depends on what HW you want your program to run on. If you target older HW then you will need to learn how it works on TexEnv. If you target GF-FX and above then you can skip it. And if you target this hight you might as well skip FP and go straight to GLSL (or some other high-level shading language).
But that is just implementation. The actual math, the concepts, the theory, all the things that are really important are the same in all cases. I sugest you to read all you find about it. Even if you don't need to implement it, it may still give you some more info you might need later on.
Thanks for the explanation, i'll do as you recommend and go through all the techniques.
I've been reading for a while about what type of "Shader Coding" is better, and it seems that there isn't a prefered platform, some guys recommend GLSL as it's the future of Coding in spite of the various bugs that exists now, and others recommend cg as they claim it's more reliaple and has a good support , and some other guys recommend Fragment Programing as it has the best support across all the cards and it's going to be further developed in the future.
So what do you think is the best platform and why?
Thank you again for keeping up with me
Just to answer few questions and guesses out there.
1) 3D textures are supported since R200 (that is, Radeon 8500 and up) and NV2x (GeForce 3/4Ti and up, except GeForce4MX and Geforce4Go), talking about gamers' grapics cards of course. And BTW I mean "supported in hardware", otherwise NVIDIA supports it in software for all its GeForce series but it's way too slow on eg GeForce2.
2) Of course fragment programming is much easier than NV_rc/ATI_fs, but you need much better hardware. Typically, you need a R300 card (Radeon 9500 and up, not Radeon 9000-9499) and NV3x (GeForce FX and up).
3) GLSL is currently being hardly supported in its full spec, so it's a bit hard to play with working and unworking features. Also, drivers tend not to work quite well actually, although they improve every time. It's a common problem to any "new" feature.
4) NVIDIA is dropping Cg more and more every day. They'll support GL2, but apart from that they're not going to make it evolve very much, as David KIRK (at NVIDIA) announced. NVIDIA would rather concentrate their effort onto HLSL (DirectX's shading language). So my guess is that Cg is not a good deal in the long run. That's fine if your engine already uses it, but if you plan to use it or not in the future I'd rather say "no go".
1) 3D textures are supported since R200 (that is, Radeon 8500 and up) and NV2x (GeForce 3/4Ti and up, except GeForce4MX and Geforce4Go), talking about gamers' grapics cards of course. And BTW I mean "supported in hardware", otherwise NVIDIA supports it in software for all its GeForce series but it's way too slow on eg GeForce2.
2) Of course fragment programming is much easier than NV_rc/ATI_fs, but you need much better hardware. Typically, you need a R300 card (Radeon 9500 and up, not Radeon 9000-9499) and NV3x (GeForce FX and up).
3) GLSL is currently being hardly supported in its full spec, so it's a bit hard to play with working and unworking features. Also, drivers tend not to work quite well actually, although they improve every time. It's a common problem to any "new" feature.
4) NVIDIA is dropping Cg more and more every day. They'll support GL2, but apart from that they're not going to make it evolve very much, as David KIRK (at NVIDIA) announced. NVIDIA would rather concentrate their effort onto HLSL (DirectX's shading language). So my guess is that Cg is not a good deal in the long run. That's fine if your engine already uses it, but if you plan to use it or not in the future I'd rather say "no go".
Thank you vincoof for the response, it seems Fragment Programing is the best path, but for now i'll implement Attenuation through 3D Textures
hey vincoof ;), tell me something about multipass rendering, I'm having problems rendering multiple lights. There's only one light drawn even if I use blending.
www.prsoftware.de
Quote: Original post by JazzD
hey vincoof ;), tell me something about multipass rendering, I'm having problems rendering multiple lights. There's only one light drawn even if I use blending.
Which blending function are you using, and do you enable blending ?
Also if you can post screenshots and/or source code that'd be great.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement