View Issue Details

IDProjectCategoryView StatusLast Update
0006571The Dark ModGraphicspublic27.10.2024 10:04
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Target VersionTDM 2.13 
Summary0006571: Investigate parallax mapping
DescriptionThere is an idea that maybe parallax bumpmapping could be useful in TDM for faking detailed geometry.
Mainly we consider Parallax Occlusion Mapping / Relief Mapping.
Additional InformationOriginal internal discussion:
* https://forums.thedarkmod.com/index.php?/topic/22523-parallax-occlusion-map-shader/
TagsNo tags attached.

Activities

stgatilov

stgatilov

22.09.2024 15:28

administrator   ~0016837

First experimental version in svn revs 10870 / 17122.
stgatilov

stgatilov

13.10.2024 12:11

administrator   ~0016869

Some basic fixes:
  r10874 Fixed accidentally broken volumetric lights.
  r10872 Fixed accidentally broken image-based lighting in ambient interaction.
  r10889 Clean interaction thoroughly after drawing it.

Without this, I got self-shadowing along sloped surfaces of parallax-mapped walls:
  r10875 Fixed shadow acne with shadow maps in case surface has highly-skewed normal map.

Before this, one could see how self-shadow moves along the surface as camera moves:
  r10876 Now parallax effect properly modifies "to-light" and "to_view" vectors.
With this, the shadow does not visibly moves.
This feature requires scale between 3D and texcoord spaces, and I got it using dFdx/dFdy....
The better solution would be to pass it in vertex attributes, but changing vertex format is not a joke =)

This fixed some nasty artefacts on AMD + greatly accelerated parallax computations:
  r10880 Disabled all filtering for parallax computations.
  r10882 Sample textures for shadowing purposes with same LOD level as for parallax.

Custom LOD level for sampling diffuse/bump/etx. texture is needed to avoid artefacts along silhouettes with low anisotropy:
  r10883 Refactor shaders: sample textures outside common functions.
  r10884 Use gradients of original texcoords when sampling material textures on parallaxed surfaces.

This optional feature allows external shadows to fall nicely onto parallax surface (otherwise it look as it falls onto plane/mesh):
  r10885 Support offsetExternalShadows flag in parallax material.
stgatilov

stgatilov

27.10.2024 10:04

administrator   ~0016893

Support for "translate":
  r10892 Refactored interaction shaders to accept single "int u_flags" instead of many different boolean flags.
  r10893 Supported parallax texture matrix (translate only) + added flag showing if any texture matrix is non-trivial.
Disable shadows automatically:
  r10894 Respect various noshadows flags in parallax self-shadows.

Issue History

Date Modified Username Field Change
22.09.2024 12:01 stgatilov New Issue
22.09.2024 12:01 stgatilov Status new => assigned
22.09.2024 12:01 stgatilov Assigned To => stgatilov
22.09.2024 15:28 stgatilov Note Added: 0016837
13.10.2024 12:11 stgatilov Note Added: 0016869
27.10.2024 10:04 stgatilov Note Added: 0016893