Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  ATI_fragment_shader and parsing  (Read 1831 times)
0 Members and 1 Guest are viewing this topic.
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Posted 2005-07-25 12:46:23 »

Hi all,
Before you tell me to go and get a new card, just hear me out for a second, humour me if you have to...

My Raedon 9200 supports ARBvp but not ARBfp, the fragment shader functionality is exposed as ATI_fragment_shader, however, it uses hardcoded OpenGL code instead of asm like txt files to parse (like ARBfp/vp and GLSL). There is an ATI_text_fragment_shader extention to do that, but that is only available under MacOSX which renders 90% of users (if not more) useless...

Does anybody know of a tool/library or another extention that can use text files to generate those fragment shaders for older ATI cards starting from 8500 to 9500? A tool is available for nvidia cards (called nvparse) to generate NV_register_combiners code from asm txt files, is there something like that for ATI cards? I have googled, but found nothing; Just a bunch of forums with people saying they are going to be building their own parser/compiler and that it is a good idea to support those cards, but nothing concrete....

Thanks in advance,
DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Spasi
« Reply #1 - Posted 2005-07-25 13:05:57 »

Go get a new card! Tongue Grin

I've searched too and couldn't find anything. I finally got used to the extension and wrote everything by hand. Cool extension, can be very powerful with enough tweaking. Too bad R200 is missing depth texture support...
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #2 - Posted 2005-07-25 13:17:51 »

Dang, crack and woffle! Looks like im going to have to stick it out with ARBfp/vp and GLSL and buy a new card. Or create another shader path for R200...

Anybody know how Doom3 did it? I think it supports the R200 for pixel lighting and bumpmapping...

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Spasi
« Reply #3 - Posted 2005-07-25 15:37:57 »

Anybody know how Doom3 did it?

I didn't find any "shader" files for NV_RC or ATI_FS, so I guess both were hardcoded in C code. If you go for it, my suggestion is this: write a simple parser to read the shader from a file and automatically generate the OpenGL calls (I've done this in Marathon). Very easy to implement but saves a lot of time.
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #4 - Posted 2005-07-25 15:49:08 »

Yes thats the plan, but my fear is that im going to have to code 4 files. 1 GLSL, 1 fragment, 1 vertex, and 1 for both ATI_fragment_shader and NV_register_combine. Either that, or write a complicated parser to parse the fragment/vertex asm files and generate the OpenGL code like you said.

I still haven't looked at the NV_register_combine extention, is it similar to ATI's in terms of functionality? Any thing one of them doesn't support that the other does?

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Spasi
« Reply #5 - Posted 2005-07-25 17:05:33 »

Yes thats the plan, but my fear is that im going to have to code 4 files. 1 GLSL, 1 fragment, 1 vertex, and 1 for both ATI_fragment_shader and NV_register_combine. Either that, or write a complicated parser to parse the fragment/vertex asm files and generate the OpenGL code like you said.

Yeah, writing such a general renderer is a big problem. I did it like that in Marathon initially, but then decided it wasn't worth the trouble and now I only have GLSL plus an NV_RC path for the crappy FX line of cards. Your decision should be based on what you want to support of course (we're going to support FX+, R300+).

By the way, I didn't mean an ARB_fragment_program to ATI_FS converter (very difficult), just a simple text representation of ATI_FS that can be easily modified without recompiling.

I still haven't looked at the NV_register_combine extention, is it similar to ATI's in terms of functionality? Any thing one of them doesn't support that the other does?

ATI_fragment_shader is the equivalent of NV_register_combiners + NV_texture_shader and both are the equivalent of DX <= 1.4 pixel shaders. Some differences:

- ATI_FS has a better internal color precision [-8, 8], whereas NV_RC has [-1, 1] with 9-bit signed fixed point values.
- NV_register_combiners is supported even on Geforce 1 & 2 (no NV_texture_shader though, only on NV20+), whereas ATI_FS needs R200+.
- NV has kept the NV_RC & NV_TS hardware on newer cards (super fast), whereas ATI is emulating the ATI_FS functionality with the fragment shader hardware on R300+ (I've not verified this, but even if it's true it's more than fast enough anyway).

Other than these, they are mostly equal in terms of functionality.
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #6 - Posted 2005-07-25 17:41:25 »

Quote
NV has kept the NV_RC & NV_TS hardware on newer cards (super fast), whereas ATI is emulating the ATI_FS functionality with the fragment shader hardware on R300+ (I've not verified this, but even if it's true it's more than fast enough anyway).

Yes, i heard that as well about them and not verified them myself too...So i can't really comment on how marginal the speed difference is, but if anything, it is definetly measurable...

Marathon is definetly looking good, i dont particularly know the details, is it going to be opensourced? or is it used for a commercial game? Either way, im happy what Java can achieve with games...

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Spasi
« Reply #7 - Posted 2005-07-25 18:42:41 »

Marathon is an engine for strategy games (mainly). It's in a good state, but far from ready and not our only project, not even our first priority actually. We do plan to release a commercial game on top of it, but that's obviously going to take a while. As for opensourcing it, time will tell. I certainly plan to release the renderer + tools someday though.
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #8 - Posted 2005-10-27 23:26:52 »

 Shocked

http://realmforge.tigris.org/source/browse/realmforge/trunk/src/Axiom/RenderSystems/OpenGL/ATI/PixelShader.cs?rev=5&view=auto&content-type=text/vnd.viewcvs-markup

Its in C#, and it also changes DX8.1 pixel shaders to ATI_fragment_shader stuff, so not ARBfp...But its a start Smiley

Anybody feels up to the challenge of writing a lexer for ARBfp?

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!