Home / Forums / Two-Tone Visible/Occluded Chams using Dual Material Passes (Part 2)

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Source

Two-Tone Visible/Occluded Chams using Dual Material Passes (Part 2)

NullPtr_
Assembly & Engine Research
MEMBER
Rep: 260
Join Date: May 2023
Posts: 27
Thanks: 62
2y ago · Mar 7, 2024 6:58 PM
#1
Configuring dual-pass shaders where occluded geometry is colored red (ZTest Greater) and visible geometry is green (ZTest LessEqual).
NullPtr_ · 0xDEADBEEF was here
The following users thanked NullPtr_ for this post:
DarkLogic
Game Logic & SDK Developer
MEMBER
Rep: 180
Join Date: Jun 2024
Posts: 28
Thanks: 41
2y ago · Mar 7, 2024 9:11 PM
#2
Pass 1: ZTest Greater, ZWrite Off, Color Red. Pass 2: ZTest LessEqual, ZWrite On, Color Green.
DarkLogic | Virtual method tables & SDKs
ApexPredator_
Source Engine Modder
VIP
Rep: 340
Join Date: May 2022
Posts: 23
Thanks: 88
2y ago · Mar 7, 2024 10:11 PM
#3
This allows instant visual feedback whether an enemy is behind cover or in direct line of sight.
ApexPredator_ · Source Engine Specialist