Quantcast
Channel: ZDoom
Viewing all articles
Browse latest Browse all 3391

Graphic/Audio Patches • Re: VLT-PBR-POM - Reworked parallax shader, new PBR materials, parallax maps for doom 1, 2, Plutonia, and TNT

$
0
0
an offset of 0.6 was a conscious decision. Without access to vertex data in the shader there is no way to prevent parallax overdraw and the best you can do if you find overdraw intolerable is in fact to set bias to 0.5, which is an intended feature at the cost of destroying parallax detail. All textures in this pack are normalized to V=50 for this reason.
How an access to vertex data in the shader can help btw? I discovered an interesting workaround to modify my relief mapping shader a bit by separating layer calculations for pixels that are darker than 50% gray of heightTex and those that are brighter (elevations). So that maxLayers for elevated is always at small amounts like 16 while maxLayer for flat and depressed are way way higher. That way you can have lots of layers on regular depressed values and few layers for some "pimples" to show through without a need to offset the whole height of the heightmap texture. The drawbacks are still some depth sorting issues like flat/depressed showing trough elevated details and it's still being masked by non-elevated details. A shader like this may still be useful for some materials like switches and pretty much anything with not that much going on on elevated details.

Another issue with texture filtering of GZDoom and pretty much any other game there is that how mipmaps are generated and it makes the matters worse for distant surfaces even with 16x anisotropy as moire wave like patterns arise. There was a paper on the web called "eliptical texture filtering" or something that enhanced the matters somewhat.

Well as soon as you push the offsets into the surfaces, the tiling beomes smaller and the idea I had was to enlarge the textures scale by modifying T = vTexCoord.st * 0.98 but then it doesn't compensate UV coordinates properly and texture go seriously misaligned, there was even an attempt to track down changes of UV coordinates and compensate that shift via (vTexCoord.st * 0.98) - vTexCoord.st but it really just looks like if no texture scale enlargement occured...

Statistics: Posted by Darkcrafter — Mon Jan 27, 2025 8:38 am



Viewing all articles
Browse latest Browse all 3391

Trending Articles