Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Di Jul 15, 2025 16:48

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: fragment shader question
BeitragVerfasst: Mi Mär 02, 2005 00:09 
Offline
DGL Member

Registriert: Di Mär 01, 2005 23:21
Beiträge: 7
I have good knowledge of OpenGL but not of the shaders or any shading language. I looked at this tutorial:

http://www.delphigl.com/script/do_show. ... g&action=2

Because my knowledge of German is non-existent, I used babelfish to translate it to English but I found the result less comprehensible then the original German. :lol: What really, really intrigues me about this article are the following two screenshots:

Bild

Bild

It seems to be saying that you have a colour-index texture (the first image), and then 3 other textures (grass, sand water), and then you use a shader to blend the 3 textures according to what is the colour-index (or combination of colour indexes, which produces nice blending). The result is the second image.

I would love to see this implemented with some Delphi or FreePascal code. The example could be very simple, no complex geometry, just a single quad. Because this is just the sort of thing that would be useful in a game which lets users create their own levels. With this technology, a user could colour an image with three colours, red, green and blue, each colour representing a different texture and ground type. The game would then use this image directly to produce the sort of multitextured scene you see in the second image above. That's beautiful!

So who is generous and talented enough to create such an example? I think a lot of people will be grateful for it.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 06:59 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
"Source Code is worth a thousand words"

If all the tutorials had working examples it would be good.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 15:07 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 17, 2002 12:07
Beiträge: 976
Wohnort: Tübingen
I quickly built a program, and again, I learned something :P
http://laboda.delphigl.com/morph.rar
The Performance is very low, and I think, with optimizations it wont be very much better...

EDIT: Argh, forgot the Source... updated

_________________
"Du musst ein Schwein sein in dieser Welt, sangen die Prinzen, das ist so 1.0. Du musst auf YouTube zeigen, dass dir dein Schweinsein gefällt, das ist leuchtendes, echtes Web 2.0."
- Hal Faber

Meine Homepage: http://laboda.delphigl.com


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 16:35 
Offline
DGL Member
Benutzeravatar

Registriert: Fr Mai 14, 2004 18:56
Beiträge: 804
Wohnort: GER/OBB/TÖL-WOR/Greiling
somehow i can't get it downloaded....

could you check if it's a proper rar-archive?

it has got about 620 kB, after having downloaded it. is it the right size?

EDIT: works now. I'll just try it out.

_________________
Bild

"User Error. Replace User and hit Continue."


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 23:22 
Offline
DGL Member

Registriert: Di Mär 01, 2005 23:21
Beiträge: 7
Hey thanks!

When I ran the program it crashed immediately, no indication of what the error was (just something at address 00000000). Do I need to download something extra, some DLLs, or what?

Edit: Oops, I forgot about the registry hack. My main system is Linux and I haven't updated the NVidia drivers for my Windows system in over a year! :oops:

Update: The program works very well. It runs at almost 500 FPS on my NVidia FX 5700.


Zuletzt geändert von cragwolf am Mi Mär 02, 2005 23:43, insgesamt 1-mal geändert.

Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 23:39 
Offline
DGL Member
Benutzeravatar

Registriert: Sa Dez 28, 2002 11:13
Beiträge: 2244
Perhaps your card doesn't support glsl and the program doesn't check the extensions.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Mär 02, 2005 23:50 
Offline
DGL Member

Registriert: Di Mär 01, 2005 23:21
Beiträge: 7
Thanks very much again. OK, finally, now I can started in GLSL!


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 3 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.007s | 14 Queries | GZIP : On ]