Luminescent
Veteran
Haven't read through the pdf, but from screenshots it seems that source rilies more heavily on material shaders and less on procedural dynamic lighting, meaning more static lightmaps. Correct me if I'm wrong, though.
Haven't read through the pdf, but from screenshots it seems that source rilies more heavily on material shaders and less on procedural dynamic lighting, meaning more static lightmaps. Correct me if I'm wrong, though.
Sxotty said:With people discussing the glowing projectiles that can be turned on would ultra shadow have a greater improvement with 30 plasma balls flying around? I am honestly curious, or does ultra shadow only work with static lights? If that is the case it is rather pointless as moving lights are one of the coolest things in my opinion.
It's been a while since I read about UltraShadow, but will depth bounds only come into play if the shadows extend far into the distance? Since Doom3 takes place indoors the shadow volumes will be rejected by z test hardware before they hit the depth bounds.
This is not what the EXT_depth_bounds_test does and it is per-pixel: fragments are discarded if the current depth in the z-buffer is outside of the specified depth bounds.Scali said:Besides, ztest works on a per-pixel basis, the depth-bounds should just cut off rendering completely, like clipping, if I understood correctly (wouldn't make sense if it still worked per-pixel).
I was thinking the same thing.3dcgi said:It's been a while since I read about UltraShadow, but will depth bounds only come into play if the shadows extend far into the distance? Since Doom3 takes place indoors the shadow volumes will be rejected by z test hardware before they hit the depth bounds.
Logically, yes, but that's not what happens most of the time. It is only done per pixel as a fallback if the "higher level culling" can't determine whether the area in question is completely inside or outside the depth bounds.SteveHill said:This is not what the EXT_depth_bounds_test does and it is per-pixel: fragments are discarded if the current depth in the z-buffer is outside of the specified depth bounds.Scali said:Besides, ztest works on a per-pixel basis, the depth-bounds should just cut off rendering completely, like clipping, if I understood correctly (wouldn't make sense if it still worked per-pixel).
Right, I was just describing the test itself, nothing more. I totally agree that there are likely limited benefits given a host of potential rejects earlier up the logical 'pipe' (including the CPU) and typical scenes.Xmas said:Logically, yes, but that's not what happens most of the time. It is only done per pixel as a fallback ...
They're zips -- you're helping to perpetuate a .rar myth.Scali said:You can find the exact shader code for Doom3 in the 'pak000.pk4' file (open with WinRar) in the glprogs subdirectory.
I think you'll find it's a couple of instructions, not that it really matters.Scali said:It can be implemented by a single mad-instruction.
The general view now seems to be that the LUT is bad for both NV and ATI hardware (perhaps to varying degrees and I've not tested it myself), but only when you force AF on (for all textures), thereby wandering outside of the game's testing arena.Scali said:In some codepaths the function is evaluated via a texture instead (NV3x-specific optimization, as Humus demonstrated, bad bad bad on ATi).
There's a bit of a balance actually since the half-angle is normalised through math.Scali said:Light vectors are normalized per-pixel with a cubemap (another NV3x-specific optimization, arithmetic would have yielded better quality, and balance between texture and arithmetic operations better).
A lot of those 2000 shaders I suspect are generated variations (m batched lights x n light types).Scali said:I don't know anything about FarCry myself... and all I know about Source is what is in the PDF I linked to before. The PDF mentions that they have close to 2000 shaders though, so it seems like they have a very varied shading system.
They're zips -- you're helping to perpetuate a .rar myth.
I think you'll find it's a couple of instructions, not that it really matters.
def c0, -0.75, -0.75, -0.75, -0.75
mad_x4_sat r0, r0, r0, c0
The general view now seems to be that the LUT is bad for both NV and ATI hardware (perhaps to varying degrees and I've not tested it myself), but only when you force AF on (for all textures), thereby wandering outside of the game's testing arena.
A lot of those 2000 shaders I suspect are generated variations (m batched lights x n light types).
Where do you get this from? It flies in the face of what Carmack said about it:Scali said:It's one instruction with ps1.x or register combiners, something like this:
Code:def c0, -0.75, -0.75, -0.75, -0.75 mad_x4_sat r0, r0, r0, c0
The specular function in Doom isn't a power function, it is a series of clamped biases and squares that looks something like a power function, which is all that could be done on earlier hardware without fragment programs.
...
The lookup table was faster than doing the exact sequence of math ops that the table encodes, but I can certainly believe that a single power function is faster than the table lookup.
Why not just say "unzip it" then? Some people might go to the trouble of downloading WinRAR when they already have XP/WinZip/pkunzip/infoZip etc .Scali said:I didn't say they weren't zips or that they were rars, I just said you can open them with winrar.
The nv20 path uses a couple of register combiners (well, more like 1.5), but then it's not doing exactly your approximation (which may need more than one... I'm no RC expert, but it's not a 1:1 mapping to ps1.1).Scali said:It's one instruction with ps1.x/GF3/4 shader extensions or with register combiners, something like this:
Haven't we been discussing replacing the texture with instructions? I think it's entirely relevant. And no, you can't _X4, to my knowledge, with ARB_fragment_program. The current arb2 math version of the LUT also weighs in at 2 instructions -- a simple POW isn't a good enough match.Scali said:if it doesn't allow the scaling suffix, like ps2.0. But that isn't relevant, since ARB2 uses a texture anyway, and only the other paths use the single instruction.
How bad is "bad", relative to forced AF? A couple of FPS difference when replacing the LUT with math? I'd be surprised if fragment processing is at all a bottleneck without AF, but I guess it could be if you regard 1600x1200 with max. AA a necessity.Scali said:It is also bad for ATi when not using AF at all, as stated before.
I haven't noticed a drop in framerate when tweaking the interaction shader (which would break replacement). Of course, this was probably in a non-fragment-limited situation, but, gosh, perhaps they're not replacing shaders with the NV40 either (*).Scali said:Also, it could be bad for NV because NV does shader replacements in the drivers, as Carmack stated before.
Batching does depend a lot on the light type and also the shader profile (eg one may only be able to do a single projected source at once with ps1.1), but it sounded as if they were being as aggressive as they could be going by their 6800 Leagues presentation.Scali said:I wonder if that is the case, if they are using stencil shadows... Then you can only handle one light at a time, so batching lights will not work. Even with shadowmaps it gets hard, because you quickly run into instruction limits. Perhaps you can batch 2 or 3 lights at most.
It's at least an order of magnitude less than a "2000 shaders" figure suggests, that's all I was saying.Scali said:So while not all 2000 shaders are truly unique, there certainly is a much wider variety of shaders than in Doom3.
In pixel shaders, it's a texture used to look up the result of an operation in a single instruction, rather than having to execute multiple arithmetic instructions to achieve the same result. It can be less precise, but if the mathematical function is particularily complex, it can also be much cheaper.digitalwanderer said:DUMB QUESTION: Where or what is this look-up table that keeps being referred to? :|
It's a lookup texture used by interaction.vfp to emulate the quasi specular-power function used by older hardware paths.digitalwanderer said:DUMB QUESTION: Where or what is this look-up table that keeps being referred to? :|
Quote:
The specular function in Doom isn't a power function, it is a series of clamped biases and squares that looks something like a power function, which is all that could be done on earlier hardware without fragment programs.
...
The lookup table was faster than doing the exact sequence of math ops that the table encodes, but I can certainly believe that a single power function is faster than the table lookup.
Chalnoth said:But where in the .pak files is it? At least, that's how I read digi's post. I'm going to start looking myself...