Forum

xreal's glsl render in quake 1 hmm i wonder ...

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

xreal's glsl render in quake 1 hmm i wonder ...

Postby revelator » Sun Apr 24, 2011 1:26 am

had a good hard look at it and even tried a few mods using it and i have to say im impressed :) for an alpha it definatly runs quite well.

then the thought came to me hey this could be interresting in regards to pushing the quake engine to the next level.

anyone had some thoughts about a pure glsl renderer for quake ?.

it would indeed open some possiblities i think :).

let me hear some thoughts.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby mh » Sun Apr 24, 2011 11:56 am

DirectQ is all HLSL but the only real per-pixel stuff I do is with water and sky warps (underwater warp too). There's a little bit of trickery with fullbrights, geometry instancing needs it, and it's mandatory if you want to do fog in D3D with SM 3+ hardware. Oh yeah, MDL frame interpolation too. That aside, it's all pure HLSL used to just recreate the original look, and with no fixed pipeline legacy stuff left at all.

The first Big Thing that anyone should do is fix water and sky warps; these are horrifically bad (and low-performing) in GLQuake; moving them to shaders just fixes everything cleanly, doesn't need surface subdivision, has massively reduced memory overhead, and runs a LOT faster.

After that it's decision time - do you want a traditional look or do you want to go all-out for eye-candy? Some things that I think (and it's only my opinion, not some kinda universal truth) bridge the gap nicely would include heat haze and other post-processing effects.

Beware of developing on NVIDIA hardware. It's much more tolerant of bad or sloppy code and what you end up with might not run on anything else. Word on the street is that their GLSL compiler will even accept HLSL syntax. :evil:

Shaders go a long way towards making static VBOs possible. Because - in many cases - you no longer need to modify vertex data on the CPU before submitting it, that vertex data can just go into static VBOs and give you increased performance. A combination of the two is definitely the next level.

Is it time to make the jump yet? I definitely think so. Shaders have been standardised for 10 years now, and everyone should have capable hardware by this point in time. There are probably a few die-hards clinging to their old stuff, but there are plenty of other options available for them. Just switching to shaders opens up a LOT of possibilities; things that weren't possible before, or would require multiple blended passes causing too much of a performance hit suddenly become really easy.

They're also more or less required to fix GLQuake. Software Quake used a lot of tricks that can only be done on a per-pixel level; there have been quite heroic efforts to accurately replicate them in OpenGL but they're never quite right and require a huge investment in time and effort than could be replaced by something like 2 lines of shader code.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby revelator » Sun Apr 24, 2011 3:05 pm

lookwise i think thats the beauty of it if say you want the original gritty looks you can have shaders for pretty much anything but i guess mappers would have to work a bit closer to engine developers for there ideas to look like they want them (unless offcourse they are mutants and can code to ;) )

what i like so much is that it gives a whole new level of freedom for the user to add stuff he or she likes.

hehe ok had no idea about that in regards to the NV tools
:lol:
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Thu Apr 28, 2011 4:53 am

atm im studying quake2xp's glsl renderer for possible inclusion with the tochris engine.

if i can get it going ill look into making a new menu system for quake (hopefully at that time someone will offer to help me with the art since i really suck at drawing :P ) maybe dp based hmm.

i select tochris since the code resembles the quake2 code the closest,
i dont really need the software renderer but if i can get away with it ill pump it up a bit with some of the newer ideas from here :).

it will mostly be for fun though since ill probably cant get the software renderer to draw stuff like bumpmaps hehe.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest