🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Infrared light, displaylists, fragmentshader
Hi all you opengl-gurus
I have a given opengl scenen, with ~100 robots(only cubes) and some walls in it.
I want to simulate the infrared sensors of the robots, 6 for each robot.
My idea so far:
1. render the scene of the view of the sensor (position, angle, range)
and a light source at the sensor position. All obstacles should reflect the "infrared" light, i dont want to reflect white walls with more intensity than black walls. They should just reflect in grey.
how can i change the colors? The problem are compiled displaylists.
2. sum the intensity of the resulting pixels.
How can i do this best? I think a fragmentshader should be optimal, but unfortunately the
fragment shader examples(nvidia-cg-toolkit-1.4.0.4/examples/runtime_ogl_vertex_fragment/demo) do not run on my machine (os:gentoo card:GeForce Ti 4200)
the error is: Neither arbfp1 or fp30 fragment profiles supported on this system.
what does that mean? Is my card too old? How do i know what is supported by my card.
Can i somehow use the vertex shader to sum the pixel?
If any ideas for further optimization please tell me.
I only need a low resolution, but maybe i can somehow render from several positions parallel.
For example if i have a robot with 6 sensors view angle 60° each, i have to render 6 times, or can i better only render once with and angle of 360° and the cut the resulting image into 6 pieces?
thanks alot for your answers
Unfortunately, your video card only supports the fp20 profile.
The list here should be helpful.
Reading the vertex and fragment programs for that sample, I think fp20 *should* be okay (it's been a while - the fragment program may need too many instructions). In demo.cpp, try changing CG_PROFILE_FP30 to CG_PROFILE_FP20 in both places.
The list here should be helpful.
Reading the vertex and fragment programs for that sample, I think fp20 *should* be okay (it's been a while - the fragment program may need too many instructions). In demo.cpp, try changing CG_PROFILE_FP30 to CG_PROFILE_FP20 in both places.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement