News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Ambient cubemap support for sikkmod

Started by Zombie, October 20, 2014, 04:12:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nbohr1more

Quote from: motorsep on November 11, 2014, 04:09:40 PM
Quote from: nbohr1more on November 11, 2014, 01:43:27 PM
Yeah, the assets in Doom 3 weren't quite made for shadow-mapping

Please enlighten me what is "made for shadow mapping" for assets means. There is no such thing.

from the RB-DOOM3-BFG release notes:

Quote

10) KNOWN ISSUES
__________________________________________

Doom 3 wasn't designed to work with shadow maps so:

- Some lights cause shadow acne with shadow mapping
- Some shadows might almost disappear due to the shadow filtering


If you feel this no longer applies then I have nothing to offer oneofthe8devilz regarding his shadow bugs.

motorsep

Quote from: nbohr1more on November 11, 2014, 04:41:49 PM
Doom 3 wasn't designed to work with shadow maps so:

- Some lights cause shadow acne with shadow mapping
- Some shadows might almost disappear due to the shadow filtering

If you feel this no longer applies then I have nothing to offer oneofthe8devilz regarding his shadow bugs.

That doesn't answer my question at all. Acne has to do with precision at least, but not with geometry. We increased precision to 32bit and acne is no more.

Point light shadow maps will disappear with the distance regardless of now assets are made. That's just how shadow mapping works.

nbohr1more

Increased precision also means a larger dataset and more processing requirements, not that it's the wrong approach.

It seems that Eric Lengyel has made a OpenGL extension to helps with Shadow Mapping precision \ acne issues by clamping:

https://www.opengl.org/registry/specs/EXT/polygon_offset_clamp.txt

(I opened a tracker against RB-DOOM3-BFG to have this added.)

motorsep

For whatever reason (infinite z-buffer most likely) you can either clamp offset and have Peter Panning effect, or you can increase precision and mess with offset to have shadows planted. Can't have both in BFG engine.

Sir Blackington

#49
So motorsep, your moving over to pcf shadow mapping in your version of BFG now? Oops just saw ur earlier posts, sorry

motorsep

Quote from: Sir Blackington on November 11, 2014, 09:39:59 PM
So motorsep, your moving over to pcf shadow mapping in your version of BFG now? Oops just saw ur earlier posts, sorry

Yeah, hopefully. Already moved, but only for high end GPUs.

nbohr1more

(vanilla)

Well, I think I've completed the first part of change I discussed about pairing a custom light with a material akin to Spectrum.

Just add the "shaderSpectrum" keyword (probably should choose a better name) then use the same Program conventions as the

"customLight" change I discussed previously.

https://github.com/nbohr1more/Doom3_divide/commit/778ff271c8634f7c668ae87a7ff1c6722ab0fcd1

https://github.com/nbohr1more/Doom3_divide/commit/b9776454c6818348e160c37d4b15ce6ca65ccec4

https://github.com/nbohr1more/Doom3_divide/commit/12f9611d5b191fb1b6674c0f9dc19c9562662dc0

https://github.com/nbohr1more/Doom3_divide/commit/dae5572df961bfd68ea47f2cd6bcb4d9a9c31bb2

https://github.com/nbohr1more/Doom3_divide/commit/f6b5ab74af8167acf06f2450225ddff0e67aa90f

https://github.com/nbohr1more/Doom3_divide/commit/75ba3be4b150067e100d41a4142f07bf871d3884

https://github.com/nbohr1more/Doom3_divide/commit/0089b79fa20623e1b8a1eee9b9c0ee7bf182eab0

https://github.com/nbohr1more/Doom3_divide/commit/7db90b5152048ffe6c662622fb63d4f02e0b4725

The only problem with this is that it will require mappers to use FragmentMap in their material to define the texture

used in the custom interaction (POM heightmap, fur texture, etc). But I guess if you are designing a whole new
ARB shader it's not too much of a leap to keep track of what inputs it takes.

nbohr1more

OK, hardcoding a light type should work but using a material defined ARB shader is a work in progress still... :(
Sorry