Ok Ampere
I try to explain so forgive me to my bad english
Lets start from simple For example about runway lights
http://fgfs.narod.ru/glsl.tar.gz
I think that its' not good to use sphere mapping for runway lights points to
calculate visibility and have using triangles instead points. - so you have
huge framerate drops on NV.
but points are quads in close view so you have to use point smooth extesion
have give us framerate drop.
So I decided to use NV_point_sprite extension
http://oss.sgi.com/projects/ogl-sample/registry/NV/point_sprite.txt that
supported from geforce4 or hier
now we have ARB_point_sprite that supports on ATI too ( but I have NV
GFX5950 so I develop on this hardware)
to have they smoohed and have glares on them like on this screen -
http://fgfs.narod.ru/fgfs-006.jpg
I take tga grayscale image with glare and put them into runway light point.
using points instead of polygons - great benefit because you only need 1
vertex insted of 3. but we can calculate visibility to directed runway
lights. w/o shaders you have to use sphere mapping but now we can use
shaders and get benefit from if. in scenery file (.stg) you have for runway
lights vertex positions, normals and color so normal of runway light - is
wnat we need to use because   it a visibility vector and we have view vector
only we need to dot3 them and we have visibility from 0 to 1 that 0- not
visible and 1 full visibility. also in vertex shader we calculate point
size - to have them faded on distances. visibility of lightpoint is placed
to alpha channel and goes to blender stage ( fragment shader) here we have
to add fog formulas and render them.
Its a short story how to render lightpoints :)
I advice you to see to sources  http://fgfs.narod.ru/glsl.tar.gz more deeply
to understand
I run it on GFX5950 linux 6629 (I don't try it on windows but it should
work) - If you have ATI you simply shange NV_point_sprite to
ARB_point_sprite but on nvidia hardware this can be slowdown 5-10%.
If you need more explanation I can give them but I suggest you to read about
shaders in Internet and visited some sites www.delphi3d.net
www.humus.ca http://developer.nvidia.com to see some examples.
Thanx in advance
Roman

----- Original Message -----
From: "Ampere K. Hardraade" <[EMAIL PROTECTED]>
To: "FlightGear developers discussions" <flightgear-devel@flightgear.org>
Sent: Wednesday, June 22, 2005 11:14 AM
Subject: Re: [Flightgear-devel] Lights was: Shadows


> On June 21, 2005 03:34 am, Roman Grigoriev wrote:
> > to Harald JOHNSEN:
> > spot lights in fgfs I had 3 years ago. they worked on vertex program and
> > registercombiners but everyone afraid of vertex programs and
multitexturing
> > You can see some screens here http://fgfs.narod.ru
> In my opinion, if the code exists already, then it shouldn't be wasted.
>
> Just a couple of questions:
>
> What is the performance hit as a percentage of the highest framerate?
>
> What is the minimal graphic card requirment?
>
> Would you mind explaining how your code works?
>
> I understand that you have a framework for this.  Would you mind
explaining to
> me what this framework is and how it works?
>
> How flexible is this particular code?  For example, can the inside of the
> hangar be lit?
>
> Can the light be cast on to other objects beside the ground?
>
>
>
> Thanks in advance,
> Ampere
>
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@flightgear.org
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 2f585eeea02e2c79d7b1d8c4963bae2d
>


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to