Pass spheremap coords to fragment shaders

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Pass spheremap coords to fragment shaders

Post by Marisa the Magician »

After struggling for a long time to implement a proper matcap shader in GZDoom, I've come to the conclusion that it is ENTIRELY IMPOSSIBLE to do it with the limited information available, and any approximations only end up looking horribly broken.

main.vp seems to have this data, but it just stays there unless SPHEREMAP is defined (what for, I wonder). I absolutely need this.

Alternatively. We are provided with a view space "eye normal", but we don't have an "eye direction" equivalent.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pass spheremap coords to fragment shaders

Post by Graf Zahl »

SPHEREMAP is only set by the shader for the mirror overlay.

There's one problem with this suggestion: We cannot preemptively pass around too much data in the shader, especially data that's normally not needed. This can become very costly on older hardware.
Post Reply

Return to “Feature Suggestions [GZDoom]”